-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Add "send signal" button to debug toolbar #110203
Comments
VS Code debuggers already support to send CTRL to debuggees. If a debug extension has opted into the VS Code's builtin JavaScript debugger supports this behavior (besides others). If the Go debugger does not support this, please file a feature request against it. |
@weinand - thanks for looking, but I wonder if this has been closed a little too quickly. This wasn't a bug or problem with a cause, but a feature request I wanted for VSCode (I did use the Feature Request template, but it might not be clear enough). From what you are saying, I now understand that the Stop button triggers a However, what I am asking is for a standardised way to inform the debug implementation of arbitrary, platform-independent signals (including SIGINT), e.g. a A use case is for those of us who want to debug our own programs which themselves handle these signals. Using my own experiences with the Go provider as an example, pressing Stop terminates the debug session. Any breakpoints placed in my Go code during or after the (I could also see use case for sending Windows messages, such as My feature request is to standardise an interface for the discovery, emission and acceptance of those signals (both API and UI), so that the concept is well-defined within VSCode, and one can go to the language providers and ask them to implement the (Unless, of course, it is trivial for a language provider to add their own button to the debug toolbar, and handle it by sending SIGINT without terminating the debugger...?) |
It seems I was not successful in bringing the idea of the The sole purpose of the The purpose of the So If you need a mechanism to send arbitrary signals to Go processes, then the Go extension can provide the UI for it. On the level of Go you know that there are processes and that there is a mechanism to send signals. |
I would like for there to be standardised support for simulating (for example) pressing CTRLC to programs running in the debugger. I appreciate that...
SIGINT
vsGenerateConsoleCtrlEvent
)I don't know how feasible this is (and maybe overthinking it) but, if it is feasible, a potentially-reasonable approach might be to offer a split-button in the Debug toolbar (i.e. the one that comes up when debugging, with the Play, Pause, Step, Stop, etc. buttons), that provides a drop-down of valid signals (for the OS); and sends whatever message/event trigger exists to the debugger, so that the language provider can do the last-hop (e.g. sending POSIX
SIGINT
, or calling Win32GenerateConsoleCtrlEvent
).I do have a short-term workaround -- at least, one that works when I am writing Go code on my Linux machine (for example): I can run
pkill -INT __debug_bin
in the Terminal view (since debugging go programs are typically compiled to a__debug_bin
for running). However, I can't do the same when I am on my Windows machine (e.g.taskkill /im __debug_bin
) because it requirestaskkill /f
, which is a "harder" kill than CTRLC seems to be. I also don't expect all languages use__debug_bin
as their debug build target, so there would need to be a way for those providers to supply the right image name (or PID,dwProcessGroupId
, etc.).Standardising a button in the UI might eventually allow for the best all-round user experience, and would at least offer a jump-off point for implementers (rather than them all coming up with their own approaches).
The text was updated successfully, but these errors were encountered: