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.

VS code remote debug connect fail.

See original GitHub issue

From @AwayQuEM on June 20, 2017 3:29

Environment data

VS Code version: 1.13.1 on Mac Python Extension version: 0.6.5 on mac Python Version: 3.5.2 OS and version: OS X 10.12.5
ptvsd version:3.0.0 on Mac

Actual behavior

I still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0

Steps to reproduce:

  • run test.py
  • then run debug in vscode

Settings

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

{
    "version": "0.2.0",
    "configurations": [
         {
            "name": "Attach (Remote Debug)",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceRoot}",
            "secret": "secet",
            "port": 8010,
            "host": "localhost",
            "remoteRoot": "${workspaceRoot}"
        }
    ]
}

Your settings.json:

{
    "python.pythonPath": "/Users/away/wanjia/test_remote_debug/venv/bin/python",
    "python.autoComplete.extraPaths": [
        "/Users/away/wanjia/test_remote_debug/venv/lib/python3.5/site-packages"
    ],
    "python.linting.enabled": false
}

Logs

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


messageService.ts:125 Debug adapter process has terminated unexpectedly
e.doShow @ messageService.ts:125
e.show @ messageService.ts:104
g.onServerExit @ rawDebugSession.ts:517
(anonymous) @ rawDebugSession.ts:431
emitTwo @ events.js:111
emit @ events.js:191
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215

Code

import ptvsd

address = ('0.0.0.0', 8010)
ptvsd.enable_attach('secret', address)
ptvsd.wait_for_attach()
print('connected')

Copied from original issue: DonJayamanne/pythonVSCode#1039

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Jan 2, 2018

@brettcannon the problem is the documentation indicates that later versions are supported, when this isn’t the case. I’ve created an issue to ensure this is fixed #514.

1reaction
DonJayamannecommented, Dec 24, 2017

@dmk255 please use 3.0.0, anything later than that isn’t currently supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote Development Tips and Tricks - Visual Studio Code
Visual Studio Code Remote Development troubleshooting tips and tricks for SSH, Containers, and the Windows Subsystem for Linux (WSL)
Read more >
visual studio code - VSCode Remote SSH Connection Failed
I got the error message below when I tried to connect my server by VScode Remote SSH: 00be3d8293b0: start SSH_AUTH_SOCK==== DISPLAY==== ...
Read more >
Remote Debugging Errors and Troubleshooting
View links to common remote debugging errors in Visual Studio. ... Unable to Connect to the Microsoft Visual Studio Remote Debugging Monitor.
Read more >
How Can I View Remote Logs in VS Code?
In VS Code, press Ctrl+Shift+P.Search for show logs.Choose Remote Server.Alternatively, switch logs in the red box shown in the following ...
Read more >
Unable to connect to the Microsoft Visual Studio Remote ...
When attempting to use remote debugging against an Integration DxP environment, the following error may occur. System.Runtime.
Read more >

github_iconTop Related Medium Post

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