debug: export runInTerminal
implementation
#136523
Labels
debug
Debug viewlet, configurations, breakpoints, adapter issues
runInTerminal
implementation
#136523
Our extension (go) implements most of DAP spec inside the go debugger (delve), but
runInTerminal
support is not one of them. I hope to utilizerunInTerminal
to supportgo
but for the initial version, I want to implement it outside of the go debugger. (Long discussion: golang/vscode-go#1626)What I want to achieve is:
delve
from the terminal (utilizingrunInTerminal
)delve
.According to the DAP spec, the RunInTerminal request shouldn't be used before the
initialize
response is sent back to the editor.However, the true debug capabilities are determined by the debugger (delve), so that complicates the logic of our inlined, proxying debug adapter.
initialize
response.runInTerminal
request and receivesrunInTerminal
response.initialize
request to delve (now running in the terminal)initialize
response from delve, and computes the capabilities differences.capabilities
event to VS Code.Not impossible, but I found it complicates the code, and testing is hard.
By accident, I found VS Code handles
runInTerminal
even beforeinitialize
response is received.Can we rely on this unexpected behavior?
Alternatively, what do you think about exporting
runInTerminal
handling as a vscode debug api, and allow it to be called fromcreateDebugAdapterDescriptor
ofvscode.DebugAdapterDescriptorFactory
?I considered to mimic VS Code's
runInTerminal
implementation by using vscode terminal APIs.But that does not provide all the benefits (e.g. external terminal, terminal+session management, consistent UX across different languages, and finally vscode team's blessing). So, I personally prefer to utilize
runInTerminal
feature.The text was updated successfully, but these errors were encountered: