question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create debug adapter in Python

See original GitHub issue

Currently 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).

@brettcannon @ericsnowcurrently @karthiknadig @int19h cc

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
int19hcommented, Apr 11, 2018

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.

0reactions
DonJayamannecommented, Sep 13, 2018

This issue was moved to Microsoft/ptvsd#801

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging configurations for Python apps in Visual Studio Code
If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on...
Read more >
microsoft/debugpy - a debugger for Python - GitHub
An implementation of the Debug Adapter Protocol for Python - GitHub - microsoft/debugpy: An implementation of the Debug Adapter Protocol for Python.
Read more >
Python Script Debugger based on Debug Adapter Protocol
Describes implementation of integrating Python scripts executing and debugging into .NET applications b based on Debugger Adapter protocol ...
Read more >
Debug Python code - Visual Studio (Windows) - Microsoft Learn
Python in Visual Studio supports debugging without a project. With a stand-alone Python file open, right-click in the editor, select Start with ...
Read more >
Debug Adapters
Adapter Maintainer Usage Android @adelphes VS Code Apache Camel contributors VS Code, Eclipse Apex @ntotten VS Code
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found