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.

Remote attach is very very buggy. Debug adapter crashes all the time

See original GitHub issue

From @nojvek on March 14, 2017 0:8

Environment data

VS Code version: Version 1.10.2 (1.10.2) Python Extension version: 0.5.9 Python Version: 2.7 OS and version: Mac OS Sierra

Expected behavior

Remote attach works like Chrome-Dev tools

Actual behavior

Python remote debugger connects with orange but crashes later

Steps to reproduce:

  • Run attach scenario

Settings

Your launch.json (if dealing with debugger issues):

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Attach (Remote Debug)",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceRoot}",
            "remoteRoot": "/home/noj/xyz",
            "port": 3333,
            "secret": "boo",
            "host": "localhost"
        }
    ]
}

Your settings.json:

Logs

Output from Python output panel
----------Generating Tags---------- ctags --options=/Users/nojvek/.vscode/extensions/donjayamanne.python-0.5.9/resources/ctagOptions --languages=Python --exclude=/site-packages/ -o /Users/nojvek/mp/analytics/.vscode/tags . /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option – - usage: ctags [-BFadtuwvx] [-f tagsfile] file …

Output from Console window (Help->Developer Tools menu)

workbench.main.js:142 TypeError: Cannot read property 'Threads' of undefined
    at PythonDebugger.threadsRequest (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/out/client/debugger/Main.js:339:27)
    at PythonDebugger.DebugSession.dispatchRequest (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/node_modules/vscode-debugadapter/lib/debugSession.js:427:22)
    at PythonDebugger.ProtocolServer._handleData (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/node_modules/vscode-debugadapter/lib/protocol.js:104:38)
    at Socket.<anonymous> (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/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): Error: TypeError: Cannot read property 'Threads' of undefined
    at PythonDebugger.threadsRequest (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/out/client/debugger/Main.js:339:27)
    at PythonDebugger.DebugSession.dispatchRequest (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/node_modules/vscode-debugadapter/lib/debugSession.js:427:22)
    at PythonDebugger.ProtocolServer._handleData (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/node_modules/vscode-debugadapter/lib/protocol.js:104:38)
    at Socket.<anonymous> (/Users/nojvek/.vscode/extensions/donjayamanne.python-0.6.0/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:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:95:13980
    at Object.v [as _notify] (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:11161)
    at Object.enter (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:14666)
    at _run (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:15987)
    at _error (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:32:15504)
    at file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:88:1241
    at g.e.dispatch (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:88:2592)
    at g.e.handleData (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:88:2100)
    at Socket.<anonymous> (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:88:1101)
    at emitOne (events.js:96:13)

Copied from original issue: DonJayamanne/pythonVSCode#819

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
DonJayamannecommented, Nov 13, 2017

From @caspar-1 on August 10, 2017 13:14

might be usefull if the Remote-Debuging wiki page clarified that PTVSD version must be 3.0.0

0reactions
DonJayamannecommented, Nov 27, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugger crashes randomly during stepover or stepin with ...
Attach to said remote container and execute any python script which uses multiprocessing module. Pause in a code block and perform stepinto ...
Read more >
VS crash when remote debugging and a breakpoint is hit
I deployed an app remotely and was debugging it from VS. I have breakpoints set, when breakpoint is hit, VS failed to show...
Read more >
Unable to start Remote debugger as it crashes immediately
Issue occurs time to time, most often on configuration Windows Server 2008 R2 Enterprise SP1 or WinServer 2012 R2 Standard. We're mainly using ......
Read more >
Crash when enabling remote debugging in jvm created ...
But, when I try to pass the same debug arguments to a JVM that I create through the JNI, I get a crash...
Read more >
How to solve Visual studio crash on attach process for ... - Blog
So I had to go through some steps to effectively get my debugger attached without a crash: First deploy the workflow in MOSS,...
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