-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support startDebugging
#38
base: main
Are you sure you want to change the base?
Conversation
Similar to the nvim-dap startDebugging support, this sets children/parent on the session See https://github.com/mfussenegger/nvim-dap/blob/72684a4d70f0ecd45efe5ea76e9510e0b2e4d600/lua/dap/session.lua#L1022-L1023 This will cause the session hierarchy to be visible when using something like `:lua local w = require('dap.ui.widgets'); w.sidebar(w.sessions).open();` and should ensure the child session receives all breakpoint changes
Great work @mxsdev ! I just tried it after a clean install, following the new Readme and got this:
Seems great but the breakpoint didn't stop anything. Actually, it transformed into a red ø, maybe to indicate it couldn't connect ? Here's my DAP setting: {
type = "pwa-node",
request = "launch",
name = "Debug AVA Test file",
program = "node_modules/ava/entrypoints/cli.mjs",
args = {
'--serial',
'${file}'
},
sourceMaps = true,
skipFiles = {'<node_internals>/**/*.js'},
outFiles = {
"${workspaceFolder}/dist/**/*.js",
"!**/node_modules/**"
},
outputCapture = "std",
console = "integratedTerminal",
} I copied a working For the record, my source file is in TS and build into |
return function(on_config, config, parent) | ||
local target = config["__pendingTargetId"] | ||
if target and parent then | ||
local adapter = parent.adapter | ||
on_config({ | ||
type = "server", | ||
host = "localhost", | ||
port = adapter.port | ||
}) | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a further change in nvim-dap to automatically use the parent host+port if the adapter
has both type server and an executable. See mfussenegger/nvim-dap#913. This should make it unnecessary to check for target
and parent, you can instead always return the same definition.
I seem to be getting |
It seems on MacOS, there are problems with localhost <> ipv4, ipv6. The solution is to either pass explicitly |
Closes #15
A lot of the old configuration is now deprecated/legacy. Check out the docs/README for new configuration options.
A new compile command is also needed for
vscode-js-debug
:@JbIPS @igorlfs if you two would be willing to test this out locally and let me know if you have any issues, that would be super helpful 🎉