Debug adapter process has terminated unexpectedly
See original GitHub issueFrom @zeus on January 7, 2017 17:23
Environment data
VS Code version: 1.8.1
Python Extension version: 0.5.5
Python Version: 2.7.13
OS and version: Windows 10
Your launch.json (if dealing with debugger issues):
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceRoot}",
"remoteRoot": "${workspaceRoot}",
"port": 4000,
"secret": "my_secret",
"host":"localhost"
}
Your settings.json:
Logs
Output from Python
output panel
None
Output from Console window
(Help->Developer Tools menu)
index.js:22 [uncaught exception]: Error: TypeError: Cannot read property 'Threads' of undefined
at PythonDebugger.threadsRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\out\client\debugger\Main.js:321:27)
at PythonDebugger.DebugSession.dispatchRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\debugSession.js:421:22)
at PythonDebugger.ProtocolServer._handleData (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:104:38)
at Socket.<anonymous> (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:24:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)onError @ index.js:22(anonymous function) @ index.js:91emitOne @ events.js:96emit @ events.js:188window.onerror @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\init.js:120i.globals.onerror @ errorTelemetry.ts:64
index.js:25 Error: TypeError: Cannot read property 'Threads' of undefined
at PythonDebugger.threadsRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\out\client\debugger\Main.js:321:27)
at PythonDebugger.DebugSession.dispatchRequest (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\debugSession.js:421:22)
at PythonDebugger.ProtocolServer._handleData (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:104:38)
at Socket.<anonymous> (C:\Users\zeus\.vscode\extensions\donjayamanne.python-0.5.5\node_modules\vscode-debugadapter\lib\protocol.js:24:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:90:21136
at Object.v [as _notify] (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:13263)
at Object.enter (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:16768)
at _run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:18089)
at _error (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:17606)
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:1178
at _.e.dispatch (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:2523)
at _.e.handleData (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:2035)
at Socket.<anonymous> (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:85:1038)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
Actual behavior
Debug adapter process has terminated unexpectedly
Expected behavior
Attach to simple process
Steps to reproduce:
- Simple program:
#!/usr/bin/env python
import ptvsd
ptvsd.enable_attach("my_secret", address=('0.0.0.0', 4000))
ptvsd.wait_for_attach()
t = 1+1
- Run
- Run Debug, failed
Other
Connected from MS VS 2015 successfully. Can’t connect from VSC with ‘attach’ option. ‘Launch’ works fine.
Copied from original issue: DonJayamanne/pythonVSCode#626
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:40 (2 by maintainers)
Top Results From Across the Web
Visual Studio Code (VSCode) - Error: Debug Adapter Process ...
1. First of all Install VSCode · 2. Install PHP Debug Adapter for Visual Studio Code · 3. Install XDebug in WAMP ·...
Read more >Debug adapter process has terminated unexpectedly (exit ...
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in...
Read more >The mystery of "Debug adapter process has terminated ...
After all, “Debug adapter process has terminated unexpectedly” sounds like something that would leave a core dump or two. And you know what, ......
Read more >Php – Visual Studio Code (VSCode) – Error - debugging
Php – Visual Studio Code (VSCode) – Error: Debug Adapter Process Has Terminated Unexpectedly. debuggingphpvisual-studio-codevisual-studio-debuggingxdebug.
Read more >Debug adapter process has terminated unexpectedly! - ionic-v3
I'm building Ionic 3 application using VScode , I was debugging my code without any problems , but now when debugging code I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
It should be fixed, please test the latest development version of the extension. Instructions can be found here https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build
If not, please feel free to re-open or comment on this issue and I’ll re-open it.
I’ve had no luck getting the python debugger to work at all. Details are here https://stackoverflow.com/questions/52826127/visual-studio-code-python-debugger-seg-fault .