-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #71
Comments
From @zeus on February 20, 2017 20:51 VS Code version: 1.9.1 Nothig changed. Is there any ideas where to dig into? |
From @dholth on March 6, 2017 22:2 I have also had trouble remote debugging a vagrant vm. Even after opening and forwarding the port in the firewall. Sometimes it works consistently and sometimes it fails. It seems to work more reliably when remote debugging a program running on the same machine. Experiments
The first time I removed the secret, it worked. I thought I had fixed it, but then it stopped working again.
There was something in attach_server suggesting the secret might confuse things when the remote process is behind a NAT (debugger connects to 127.0.0.1, but debugged sees connection from 10.)... Mysterious. |
From @zeus on March 6, 2017 22:29 Just upgraded to extension 0.5.9 and vsc 1.10.1 Now i've got this in console:
|
From @itowlson on March 10, 2017 3:19 I am seeing this issue when I specify a secret in I don't see the console log messages other users have mentioned. However, I am using Kubernetes port forwarding to connect localhost:3000 to the remote port 3000, and Kubernetes reports the following error, which reads like the target process is rejecting the request with the secret.
|
From @GiuseppeLaurenza on May 1, 2017 10:34 i do not know if it is better to open another issue than write here, but for now I prefer to extend this one. from multiprocessing import Pool, cpu_count
def foo(arg):
print arg
if __name__ == '__main__':
list_files = ["a", "b", "c"]
pool = Pool(processes=(cpu_count() - 1))
pool.map(foo, list_files)```
using debugger of other IDE (like pycharm) and debug in terminal with pdb, I have not any problem |
From @WasabiFan on May 2, 2017 4:43 I am seeing the same issue. The log is available here. This seems to happen regardless of whether I have a secret configured. |
From @zWaR on May 18, 2017 21:26 I am also getting this problem. The log in the Console is:
|
From @zWaR on May 19, 2017 17:52 In the python output panel I had the following error:
I was able to fix this by installing ctags with homebrew: However this does not stop debugger from crashing when attaching to a remote end. |
From @bpartridge on May 25, 2017 0:39 Also getting this problem on Mac. It seems
Interestingly, telnetting into that port also fails to receive anything. Is there documentation on the raw protocol? It's possible that something's broken on the PTVSD side, or we're connecting wrong somehow... |
From @etchen99 on May 28, 2017 19:20 I am also running into this issue on OSX. extension version 0.6.4. I get the ctags output message in the Python output window and the messageService error on the Console, but nothing all that useful. |
From @Kenuat on June 1, 2017 13:24 Same problem here, Windows 8.1 latest versions of Code and extension, verbose output:
|
From @mostafaeweda on August 16, 2017 16:28 I'm hitting the same issue |
Please ensure you are using version 3.0.0 of PTVSD |
From @mostafaeweda on August 16, 2017 23:0 @DonJayamanne I'm using version 3.0.0 and still hitting various attach issues (including this) - will include stack traces when I hit it again. |
From @marcosfede on August 24, 2017 3:42 Using version 3.0.0 of ptvsd, trying to connect shows
|
From @royrwood on September 3, 2017 12:33 I'm also having problems, even with v3.0.0 of ptvsd. I can connect to my remote Python app, but stepping through the code is erratic. Breakpoints are skipped, and single-stepping results in multiple lines executed. Eventually the remote process dies and prints this to console:
This is running on an Ubuntu 16.10 system, VS 1.15.1, ptvsd 3.0.0. Visual Studio Code version:Version 1.15.1 launch.json:
Sample code:from future import print_function print('Hello, world.') max_val = 5 for i in range(1, max_val): Output:$ python count.py |
I had to down grade to ptvsd 2.2.0 to make the remote debugging to work from a host machine into a docker container. It only works with that version and not 3.0.0 or higher. |
Hi @DonJayamanne, I seem to have the same problem. I get the error message "Debug adapter process has terminated unexpectedly". I have tried using the experimental branch as you suggested. I don't see any errors or messages at all but the debugger does not connect. Please let me know what information I can provide to help you debug the issue. Thanks! |
@nrempel
Note: With the above repo, you'll be using the older version of the debugger and PTVSD version 3.0.0 |
Hello, I tried those steps and was successful with both. My use case is actually django in a docker container so I tested with this project: https://github.com/DonJayamanne/vscode-python-samples/tree/master/remote-debugging-docker-django This project seems to connect fine so I will look at differences between my project and this one such as python versions etc. One thing that doesn't seem to work on the Thank you. If I'm able to reproduce my issue with a different python version or something I'll open a new issue. |
We're currently working on a new (improved) debugger. Currently referred to as However, lets not start using the experimental debugger just yet. Lets keep things simple and identify what's wrong with your code (settings), then move onto other issues. @nrempel and thanks for getting back. |
@DonJayamanne thanks very much for the quick reply. I created a new issue since it seemed a little off topic for this thread: #1600 Let me know if you want to continue in this thread and I'll copy over the information to here. I was able to get the debugger running in my main project by using the django development server instead of gunicorn. But it suffered from the same problem of unverified breakpoints. I'm hoping it is the same issue as in your example repository since that is a much simpler project than the one I'm working on. |
Hi @DonJayamanne When I try sourcing the python script, or loading the
This is the same error as I get when trying to use ptvsd directly inside of an interactive session:
So, at this point, I'm unable to test remote debugging using the experimental debugger. |
Hi @DonJayamanne It was a bit flaky though. Using However, it seems like PTVSD needs some work to support an execution environment like Maya's embedded interpreter. |
import time
import ptvsd
ptvsd.enable_attach()
time.sleep(10)
print("Got here...")
print("HELLO")
{
"name": "Attach",
"type": "pythonExperimental",
"request": "attach",
"port": 5678,
"host": "localhost"
}, |
Hi @DonJayamanne. It's been a few weeks, so I apologize for not getting back to this sooner. I was wondering what the status of the experimental debugger is. E.g. has been been released as an official wheel yet, or is the latest version still requiring an explicit github URL to use? |
@gnatty7 you can install it using |
Thanks @brettcannon . Any news on whether an embedded Python environment will work with the debugger, like in Maya? This is something that PyCharm supports for example. |
@gnatty7 yes, it should work. |
Hi @brettcannon, @DonJayamanne |
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. |
From @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):
Your settings.json:
Logs
Output from
Python
output panelOutput from
Console window
(Help->Developer Tools menu)Actual behavior
Debug adapter process has terminated unexpectedly
Expected behavior
Attach to simple process
Steps to reproduce:
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
The text was updated successfully, but these errors were encountered: