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 was archived by the owner on Aug 2, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 2, 2023. It is now read-only.
Debugging fails with timeout when using conda run #1944
Debug the python extension. Make sure you're in experiments DebugAdapterFactory - experiment and PtvsdWheels37 - experiment. Remove all references in the resolver to "pythonPath" as it's deprecated.
Select conda as interpreter.
Start debugging.
Expected behavior
Debugging works. And the command should begin with conda run -n base python ....
I believe that this is fundamentally the same problem as #1930, the fix for which has only just went in. Can you try it with ptvsd v5.0.0a8, and see if that fixes it?
Actually, looking at the logs, I don't think even that would help. Not even the parent PID matches what we spawned:
I+00001.203: /handling #2 request "launch" from IDE[1]/
Waiting for connection from debug server with PID=35692...
D+00003.047: Server[?] --> {
...
"process": {
"pid": 17816,
"ppid": 27720,
"executable": "C:\\Users\\karraj\\AppData\\Local\\Continuum\\anaconda3\\python.exe",
"bitness": 64
}
}
}
Looking at the source code for conda run, it's because it generates a massive shell script, and then uses the shell to run that. So the chain is ptvsd.launcher -> conda -> cmd.exe -> python.exe, where the PID that the launcher has from spawning the process is that of conda, but neither the PID nor the parent PID it gets from python.exe matches that.
So it's the same fundamental problem, but the fix for #1930 won't work. It seems that we'll have to remove PID validation entirely, and just assume that the first connection that comes in is the launched process, regardless of which PID it reports. :/
Activity
int19h commentedon Nov 22, 2019
I believe that this is fundamentally the same problem as #1930, the fix for which has only just went in. Can you try it with ptvsd v5.0.0a8, and see if that fixes it?
int19h commentedon Nov 22, 2019
Actually, looking at the logs, I don't think even that would help. Not even the parent PID matches what we spawned:
Looking at the source code for
conda run, it's because it generates a massive shell script, and then uses the shell to run that. So the chain is ptvsd.launcher -> conda -> cmd.exe -> python.exe, where the PID that the launcher has from spawning the process is that of conda, but neither the PID nor the parent PID it gets from python.exe matches that.So it's the same fundamental problem, but the fix for #1930 won't work. It seems that we'll have to remove PID validation entirely, and just assume that the first connection that comes in is the launched process, regardless of which PID it reports. :/
Fix microsoft#1944: Debugging fails with timeout when using conda run