Failed to launch debug adapter in romote debugging with debugpy.
See original GitHub issuePython Environment:
Steps to Reproduce 1.Typing code in .py and set breakpoint in the code.
input('>')
print('hello')
2.Install “debugpy” in the current python environment. 3.In command prompt(right-click the python environment and select “Open Command Prompt Here…”), execute: python -m debugpy --listen 127.0.0.1:4022 C:\Users\vwazho\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py 4. Launch VS and Debug > Attach to Process, in dialog: a. Select connection type with Python remote(ptvsd) b. Connection target with 127.0.0.1:4022 c. In Available processes list, select the appropriate python.exe, click “Attach” 5. Type enter in the console 6.Check that it stops at the breakpoint Expected behavior remote attach successfully with no errors
Actual behavior
error dialog pop up when attaching.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
@int19h I believe this is due to some parsing of the adapterLaunchInfo I added to support passing variable presentation options to the debugger upon launch. I tested when launching through the VS but I didn’t test when debugging by attaching to a remote process, which is causing this error.
Specifically, in DebugAdapterLauncher.cs, line 207:
This bug is caused by adapterLaunchInfo.LaunchJson being null, which I didn’t think could happen. Bad assumption on my part. I’ll get it fixed.
My comment was wrong, we definitely can read from the options page. The PR has been updated with the new logic to do so. 😃