-
I asked this question in the discussions tab of the nvim-dap plugin, but the more I'm looking into this the more I'm thinking I may be experiencing a overseer issue (rather than an nvim-dap issue). Is it intended that the debug aborts when the preLaunchTask fails? I'm seeing the correct behavior out of overseer when my preLaunchTask (a build of my C++ project) fails, so it seems to be interpreting the failure/success of the preLaunchTask successfully. However, dap doesn't seem to care and launch regardless. Overseer lua config: require('overseer').setup({
component_aliases = {
-- Most tasks are initialized with the default components
default = {
{ 'display_duration', detail_level = 2 },
'on_output_summarize',
'on_exit_set_status',
{
'on_complete_dispose',
statuses = {},
require_view = { 'SUCCESS' },
},
},
-- Tasks from tasks.json use these components
default_vscode = {
'default',
'on_result_diagnostics',
{
'open_output',
direction = 'float',
on_complete = 'failure',
on_start = 'never',
focus = true,
},
},
},
}) .vscode/launch.json "version": "0.2.0",
"configurations": [
{
"type": "codelldb",
"request": "launch",
"name": "vsc_Debug",
"preLaunchTask": "ninja_build_test",
"program": "${workspaceFolder}/build/tests",
"args": [],
"cwd": "${workspaceFolder}"
}
]
.vscode/tasks.json {
"label": "ninja_build_test",
"type": "shell",
"presentation": {
"echo": false,
"reveal": "silent",
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"linux": {
"command": "ninja tests -C build"
},
"windows": {
"command": "ninja tests.exe -C build"
}
}, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Doing a little more debugging, I can see that overseer correctly invokes the "ninja_build_test" task as a preLaunchTask. The preLaunchTask is correctly evaluated as failing. As an aside, I'm having a hard time understanding the interaction between overseer and nvim-dap here. I start by invoking the dap with "continue," in which case there is some listener table (?) in overseer that notices a dap config is being invoked with a "preLaunchTask" field in the config. Then, a listener function creates a coroutine to launch the task and watch for its completion/results. Is that a correct understanding of what is happening? If so, I'm not seeing where a negative result would stop the nvim-dap process, so maybe that is a feature that isn't currently present in overseer? Would that be as simple as "issue an abort command to the dap on preLaunchTask failure," or is there some complexity (perhaps due to the coroutine?) that I'm missing? Sorry for the n00b questions, I'm just now getting into nvim and lua, so I'm trying to learn lua as I look through this code |
Beta Was this translation helpful? Give feedback.
-
Fixed in #344 |
Beta Was this translation helpful? Give feedback.
Fixed in #344