You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem demo:
The demo repository is Lslightly/delve-dbg-child-proc, where I can debug child process in delve. But I can't debug child process in vscode-go.
Although most go projects are organized as package and support of single process with multiple goroutines is enough, there are projects like golang/go where the cmd/go can invoke cmd/compile tool as the child process. The command arguments passed to cmd/compile tool is complicated. It will be convenient to debug cmd/compile through debugging go build -a . command instead of debugging go tool compile ... ... ... command. So demand of multiple process debugging feature exist.
Besides, this scenario(use case) is different from the client/server architecture which may run the process for a long time and you can connect to the delve server at any time(or make the child process sleep for some seconds).
Describe the solution you'd like
A clear and concise description of what you want to happen.
Enable target follow-exec -on by default or provide an option to enable child process debug. (--init option of delve is disabled when combining with --headless option)
Allow setting breakpoint whose location is not found yet but will be found in child process.There are some mistakes. See the comment
This needs support in delve to answer yes when the breakpoint is not found to set a suspended breakpoint(in delve but not in vscode-go. vscode-go can always set the breakpoint on since there is no side effect).
Reuse the Call Stack for debugging child process. (low priority. Since attach remote and substitutePath(I haven't succeeded in using this feature yet) can be used to debug child process in different vscode window.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I will upload a demo video later.
The text was updated successfully, but these errors were encountered:
Allow setting breakpoint whose location is not found yet but will be found in child process.
This needs support in delve to answer yes when the breakpoint is not found to set a suspended breakpoint(in delve but not in vscode-go. vscode-go can always set the breakpoint on since there is no side effect).
vscode-go successfully set breakpoints whose location is not found through CreateBreakpoint
Delve provides RPCServer.FollowExec which is equal to target follow-exec -on/-off command. However, now vscode-go does not use this API.
The only thing left is to make calling RPCServer.FollowExec possible.
Lslightly
changed the title
add support for target exec -on to debug child process
add support for target follow-exec -on to debug child process
Mar 12, 2025
Lslightly
changed the title
add support for target follow-exec -on to debug child process
add support for debugging child process enabled by delve backend
Mar 12, 2025
Uh oh!
There was an error while loading. Please reload this page.
Problem demo:
The demo repository is Lslightly/delve-dbg-child-proc, where I can debug child process in delve. But I can't debug child process in vscode-go.
Although most go projects are organized as package and support of single process with multiple goroutines is enough, there are projects like golang/go where the cmd/go can invoke cmd/compile tool as the child process. The command arguments passed to cmd/compile tool is complicated. It will be convenient to debug cmd/compile through debugging
go build -a .
command instead of debugginggo tool compile ... ... ...
command. So demand of multiple process debugging feature exist.Besides, this scenario(use case) is different from the client/server architecture which may run the process for a long time and you can connect to the delve server at any time(or make the child process sleep for some seconds).
Related issues and blogs:
Describe the solution you'd like
A clear and concise description of what you want to happen.
target follow-exec -on
by default or provide an option to enable child process debug. (--init
option of delve is disabled when combining with--headless
option)Allow setting breakpoint whose location is not found yet but will be found in child process.There are some mistakes. See the commentThis needs support in delve to answer yes when the breakpoint is not found to set a suspended breakpoint(in delve but not in vscode-go. vscode-go can always set the breakpoint on since there is no side effect).The source code location ofyesno
decision is pkg/terminal/command.go#L1868Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: