Debug Adapter in Python
See original GitHub issue~This issue is used to track discussions related to using PTVSD as the debug adapter:~
- ~File issue on VSC for reverse request (custom request from DA to VSC). One example of existing item is
runInTerminalReqeust
~ - ~File issue on VSC for logging of DA messages (every adapter needs to write custom code to enable this)~
- ~When debugging multiple procs (parent & multiple children), then VSC will display a single debug session.~
- ~Will clicking
Stop
terminate all debug sessions?~ - ~Will the parent session be the only one that gets the terminate session~
- ~Will clicking
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
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
The Debug Adapter Protocol makes it possible to implement a generic debugger for a development tool that can communicate with different ...
Read more >Debugging configurations for Python apps in Visual Studio Code
This article mainly addresses Python-specific debugging configurations, ... Specifies the host address and port for the debug adapter server to wait for ...
Read more >Official page for Debug Adapter Protocol
Debug Adapter Protocol. The Debug Adapter Protocol (DAP) defines the abstract protocol used between a development tool (e.g. IDE or editor) and a...
Read more >debugpy - PyPI
debugpy is an implementation of the Debug Adapter Protocol for Python. The source code and the issue tracker is hosted on GitHub.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My suggestion is to allow
"logToFile"
to be either a boolean (with the same semantics as before) or a string, so that users can place the logs wherever they want, rather than the default location.Also, perhaps it could use a better name? As it is, it’s a bit confusing, because it’s unclear what is getting logged to the file, especially since some other VSCode debuggers have facilities to redirect the standard logging facilities in the language itself (i.e. for user app logs, not debugger logs), and we might want to do something like that in the future as well for the Python
logging
standard module. So maybe something like"debuggerLog"
?OTOH if we want to match what the other debuggers do, the Node.js and Go ones call this setting
"trace"
- although that is even more vague. C++ debugger seems to not have it in launch.json at all, and instead uses an extension setting - I suspect it’s less discoverable, but on the other hand, it will come up when searching global settings, so it’s hard to say.(Renaming or moving it shouldn’t be a backwards compatibility issue, since it’s strictly a diagnostic tool - nobody should have that floating around in their debug configs, it’s only meant to be enabled to report a bug. )
Create a single Package containing binaries for following: This can be done by downloading wheels for each of the platforms and merging the ptvsd directory across all the wheels. This prevents us for shipping multiple copies of the debugger to support wheels. See https://github.com/karthiknadig/vscode-python/commit/9d8f46374923128d3f96921818c3f93a9ef6871f for reference
DebugAdapterDescriptor creates these two when in wheels experiment
logToFile
is set then append--log-dir <dir>
. Note python interpreter is needed for launchLogging should also be done via DebugAdapterTracker
logToFile
then enable logging using debugAdapterTracker. Note that we need logs in both attach and launch case. In attach case with the new adapter, there is nothing running on the local machine. To get local logs we need to use tracker. I had suggested this a long time ago as a preparatory. But now we will need it. The tracker exists for this purpose so we should make use of it.Telemetry for wheels.