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
{{ message }}
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
When debugging a Python app using the external terminal or terminal integrated into VS Code, PTVSD does not handle the response sent to it. The response is below. {"type":"response","seq":3,"command":"runInTerminal","request_seq":2,"success":true}
Note, the request was not sent by PTVSD, it was sent by the typescript code (adapter) to launch the PTVSD (debugger in a terminal). This is a protocol request sent to VS Code.
The chain of events is as follows:
VS Code sends initialize request to type script debug adapter
We respond with list of capabilities
Then, we get the launch request from VS Code, type script debug adapter handles this
Type script debug adapter sees that the app needs to be launched in a terminal, hence a runInTerminal request is sent to VS Code
VS Code launches the app in the terminal
PTVSD starts processing requests, by replying back with the initialized event
As soon as this event received from PTVSD, typescript debugger will then take VS Code and connect it directly to PTVSD. (i.e. they communicate with each other, streams are piped and typescript debugger is out of the pic).
The problem is VS code , sends a couple of requests and responses to PTVSD
VS Code sends the response to runInTerminal and a couple of other requests (these are all sent together)
Type Script debugger could intercept these messages and cut and chop the messages before sending them to PTVSD. However that's quite inefficient (reading the streams, parsing it and splitting, then sending the necessary bit. i.e. we're no longer piping the streams). Hence this bings in a lot more code that necessary.
So, the easiest and best solution is for PTVSD to handle the runInTerminal response and just ignore it, rather than raising an exception.
The text was updated successfully, but these errors were encountered:
microsoft/vscode-python#746
@int19h @ericsnowcurrently
When debugging a Python app using the external terminal or terminal integrated into VS Code, PTVSD does not handle the response sent to it. The response is below.
{"type":"response","seq":3,"command":"runInTerminal","request_seq":2,"success":true}
Note, the request was not sent by PTVSD, it was sent by the typescript code (adapter) to launch the PTVSD (debugger in a terminal). This is a protocol request sent to VS Code.
The chain of events is as follows:
VS Code sends initialize request to type script debug adapter
We respond with list of capabilities
Then, we get the launch request from VS Code, type script debug adapter handles this
Type script debug adapter sees that the app needs to be launched in a terminal, hence a
runInTerminal
request is sent to VS CodeVS Code launches the app in the terminal
PTVSD starts processing requests, by replying back with the
initialized
eventAs soon as this event received from PTVSD, typescript debugger will then take VS Code and connect it directly to PTVSD. (i.e. they communicate with each other, streams are piped and typescript debugger is out of the pic).
The problem is VS code , sends a couple of requests and responses to PTVSD
VS Code sends the response to
runInTerminal
and a couple of other requests (these are all sent together)Type Script debugger could intercept these messages and cut and chop the messages before sending them to PTVSD. However that's quite inefficient (reading the streams, parsing it and splitting, then sending the necessary bit. i.e. we're no longer piping the streams).
Hence this bings in a lot more code that necessary.
So, the easiest and best solution is for PTVSD to handle the
runInTerminal
response and just ignore it, rather than raising an exception.The text was updated successfully, but these errors were encountered: