In "attach" mode, know which debug configuration attached to the adapter #1532
Unanswered
LukasHeller
asked this question in
Q&A
Replies: 1 comment
-
There is no API for it, and I don't think there's any easy way to retrieve this info from the debuggee. But it is pretty easy to do, so it's something that could be a feature in debugpy v2 after we have a stable release of that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In attach mode, is it possible to use "lauch.json" to tell apart which debug configuration was used to connect to the adapter? It could also just be reading out the configuration "name", which is unique. The idea being that this information can be used to test different parts of the code, depending on the debug configuration.
I am using environment variables to do so in "launch" mode (see below), but this option is not possible in "attach" mode.
Thank you very much!
"configurations": [
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"env": {
"VSCODE_DEBUG_MODE": "true",
}
},
Beta Was this translation helpful? Give feedback.
All reactions