dap-mode icon indicating copy to clipboard operation
dap-mode copied to clipboard

Add support for VSCode Tasks

Open elken opened this issue 2 years ago • 4 comments

Purpose

The idea of this PR was initially to just handle preLaunchTask, which is a more robust, vscode-native version of dap-compilation for running tasks before a debug configuration. It shortly spiraled into the current PR, which I don't think goes too far in terms of support.

It aims to be much more in line with vscode, and should be able to handle many more setups ootb.

Changes

Move sanitize-json to a utils function

Straightforward, it's used in dap-tasks and dap-launch.

Add support for handling preLaunchTask

Correctly handles tasks specified in a debug config's preLaunchTask. If no task is found matching the name, the config errors (much as it would in vscode). Down the line, dap-compilation could potentially be removed; but as it stands currently it actually takes precedence (so as to not break current setups). This behaviour could be gated behind a setting, if required.

Add support for dependsOn

Allows a hierarchy of tasks to be created (to say build several dependent projects first, then debugging this one).

Summary

Open to any and all critique, hopefully we can get this merged in a good state :D

I did try and also respect presentation options, but I couldn't quite work it. save-window-excursion solves the problem, but I couldn't make it work in a toggleable way.

elken avatar Mar 08 '22 16:03 elken

can you resolve conflicts?

yyoncho avatar Jul 05 '22 19:07 yyoncho

I approved it, lets's iterate based on the feedback.

yyoncho avatar Jul 05 '22 19:07 yyoncho

Oh conflicts, good catch! I'll look at these now :D

My bad!

elken avatar Jul 05 '22 19:07 elken

@yyoncho can you review again please? I'm not sure about my merge conflict resolution

elken avatar Jul 05 '22 20:07 elken

Paging Dr. @yyoncho :)

elken avatar Aug 27 '22 06:08 elken