-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Debugee exit code not correctly reported during event_exited #475
Comments
The exited event is an internal DAP event, and not supposed to be used by end user. I'm wondering how this affects the user experience? |
Hmm, that is strange, what do you mean by internal ? My use case is very much dependent on the exit code, for example i would like to keep the console / terminal stdout/stderr open when the exit code is 1 and simply close it if it is 0 since i don't want / care for the output in that case (for example). Note that i am already using this approach with other adapters - such as codelldb and lldb for example which pickup the exit code correctly. |
The event is a payload that's used between DA Client and DA, not exposed to external. That's why I'm asking how you monitor it in your use case. |
As i mentioned in the op, i am using https://github.com/mfussenegger/nvim-dap. That is the debug client which communicates with with the debugger, and the use case i presented above - i would like to use the exit status of the debugee to control the user interface of the editor. @mfussenegger not sure if this is a valid case ? |
nvim-dap allows users to subscribe to the events to run arbitrary custom logic. The specification itself doesn't put any restrictions on how clients might use the data. Looks like the exit value is currently hard-coded to 0 Line 84 in 31cc033
Could the |
Yes, this is the right place to correct the exit value. |
I am having an issue where the exit code of the debugee is reported as 0 instead of 1 when event_exited completes (fires back), when the debugee exits the session. I am using the latest version of this extension and I am using the following dap plugin in neovim https://github.com/mfussenegger/nvim-dap. I did report the issue first there but the maintiner considers this to be an issue within the actual implementation.
Environment
Steps To Reproduce
Initially reported here - mfussenegger/nvim-dap#886
Sample project for reproduction - sample.zip
Current Result
Exit code is 0
Expected Result
Exit code is 1
Additional Information
None
The text was updated successfully, but these errors were encountered: