dap-mode
dap-mode copied to clipboard
Add support for VSCode Tasks
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.
can you resolve conflicts?
I approved it, lets's iterate based on the feedback.
Oh conflicts, good catch! I'll look at these now :D
My bad!
@yyoncho can you review again please? I'm not sure about my merge conflict resolution
Paging Dr. @yyoncho :)