Create debug adapter in Python
See original GitHub issueCurrently the debug adapter is written in typescript, and in the launch
handler we start the python process that’s running PTVSD, after this we connect the VSC streams to the python process streams.
From then on the Typescript DA doesn’t play any role.
VS Code have some changes in the pipeline that’ll make it possible to write the debug adapter in Python. I.e. just before the debug is launched we have the ability to provide the path to the selected (workspace) python interpreter, along with any custom arguments. https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.proposed.d.ts#L384
However this seems to be in preview (no idea when they’ll release this).
Either way, what’s good about this is the fact that we can build the debug adapter completely in python (as part of PTVSD).
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
VS implementation doesn’t have a debug adapter in that sense - they provide us with an extensibility point for stuff like launch and attach, that works via .NET interfaces, which are implemented by code in the same process as VS itself. Turning it into an out-of-proc Python implementation would be a substantial change, and I’m not sure it’s even feasible for all the VS features that we need.
This issue was moved to Microsoft/ptvsd#801