Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug adapter process has terminated unexpectedly #618

Closed
ghost opened this issue Jan 24, 2018 · 5 comments
Closed

Debug adapter process has terminated unexpectedly #618

ghost opened this issue Jan 24, 2018 · 5 comments
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@ghost
Copy link

ghost commented Jan 24, 2018

Environment data

VS Code version: 1.19.2
Python Extension version: 0.9.1
Python Version: 3.6.4
OS and version: Arch Linux(with testing repo)

Actual behavior

Debug adapter process has terminated unexpectedly.

Expected behavior

The debugging process should continue throughout the script execution.

Steps to reproduce:

  • Run loop with HTTP requests in Process(parallel requests) and output to the console for each HTTP request (print ("some information about the response")).
  • Use configuration for running:
{
            "name": "run.py",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceFolder}/run.py",
            "cwd": "${workspaceFolder}",
            "env": {},
            "envFile": "${workspaceFolder}/.env",
            "debugOptions": [
                "RedirectOutput"
            ]
}

Logs

Output from Python output panel

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

/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:2744 Debug adapter process has terminated unexpectedly
e.doShow @ /opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:2744
messageService.ts:126 Debug adapter process has terminated unexpectedly
e.doShow @ messageService.ts:126
e.show @ messageService.ts:105
_.onServerExit @ rawDebugSession.ts:535
(anonymous) @ rawDebugSession.ts:449
emitTwo @ events.js:111
emit @ events.js:194
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215
console.ts:123 [Extension Host] (node:5326) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
messageService.ts:126 Debug adapter process has terminated unexpectedly
e.doShow @ messageService.ts:126
e.show @ messageService.ts:105
_.onServerExit @ rawDebugSession.ts:535
(anonymous) @ rawDebugSession.ts:449
emitTwo @ events.js:111
emit @ events.js:194
__dirname.ChildProcess._handle.onexit @ internal/child_process.js:215
@DonJayamanne
Copy link

Please could you provide some sample code with instructions to replicate this issue?

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-debugging info-needed Issue requires more information from poster labels Jan 24, 2018
@DJManas
Copy link

DJManas commented Feb 18, 2018

VSCode: 1.20.1 (1.20.1) - MacOS
Python plugin: 2018.1 (01 Feb 2018)
Python version: 3.6.4 on MacOS, 3.5.5 on Armbian (Banana PI M1+)
ptvsd: 3.0.0 on both MacOS and Server (even tried with the newest one, no change)

Attach configuration:

  {
      "name": "LowBattery: Remote",
      "type": "python",
      "request": "attach",
      "localRoot": "${workspaceFolder}",
      "remoteRoot": "/home/djmanas/python",
      "port": 3333,
      "secret": "my_secret",
      "host": "192.168.1.101"
    },

Code server.py:

#!/usr/bin/env python3
""" Simple script that will notify user when modules are under certain battery percent """
import ptvsd

ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
ptvsd.wait_for_attach()

print('test‘)

In VSCode, after upload, comment out debug lines.

On server through SSH python3 server.py

It waits for attach netstat -lnp

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.1.101:3333      0.0.0.0:*               LISTEN      30357/python3

Launch the LowBattery: Remote debug configuration and you will get the error.

Does the same thing when I redirect the port through ssh -L 3333:127.0.0.1:3333 and change every IP to localhost.

@DonJayamanne
Copy link

@DJManas you are experiencing a different issue, you are trying to attach. Please create a separate issue.

@DonJayamanne
Copy link

Closing this issue due to inactivity. Please feel free to reopen if you experience the issue once again and have the information requested.

@DonJayamanne DonJayamanne added closed-invalid and removed info-needed Issue requires more information from poster labels Feb 18, 2018
@DJManas
Copy link

DJManas commented Feb 18, 2018

Ok, opening new issue. To be honest I had browsed a lot issues like mine. In some I have read, that ptsvd can be higher than 3.0.0. And I am totally lost in your bug tracker... A lot of hyperlinks to other issues...

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants