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

Debugging error "Couldn't find a debug adapter for debug type python" #16024

Closed
edervishaj opened this issue Sep 9, 2024 · 3 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster interactive-window-debugging notebook-debugging

Comments

@edervishaj
Copy link

edervishaj commented Sep 9, 2024

Environment data

  • VS Code version: 1.93.0
  • Jupyter Extension version (available under the Extensions sidebar): v2024.8.0
  • Python Extension version (available under the Extensions sidebar): v2024.14.0
  • OS (Windows | Mac | Linux distro) and version: macOS Sonoma 14.6.1
  • Python and/or Anaconda version: Python 3.9, 3.10
  • Type of virtual environment used: conda 24.7.1
  • Jupyter server running: Local

Actual behaviour

Stepping over breakpoint that calls TF 1.x session.run throws "Couldn't find a debug adapter for debug type python" and the debugger remains running but cannot proceed further.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

21:45:37.178 [debug] [Debug] to kernel: {"command":"threads","type":"request","seq":55}
21:45:37.178 [debug] [Debug] to kernel, mapped: {"command":"threads","type":"request","seq":55}
21:45:37.187 [debug] [Debug] response: {"seq":57,"type":"response","request_seq":55,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"MainThread"},{"id":2,"name":"Thread-2"},{"id":3,"name":"Thread-3"},{"id":4,"name":"IPythonHistorySavingThread"},{"id":45,"name":"Thread-8"}]}}
21:45:37.503 [debug] [Debug] to kernel: {"command":"scopes","arguments":{"frameId":5},"type":"request","seq":56}
21:45:37.503 [debug] [Debug] to kernel, mapped: {"command":"scopes","arguments":{"frameId":5},"type":"request","seq":56}
21:45:37.506 [debug] [Debug] response: {"seq":58,"type":"request","command":"startDebugging","arguments":{"request":"attach","configuration":{"type":"Python Kernel Debug Adapter","name":"Subprocess 20384","justMyCode":true,"__mode":1,"__cellIndex":3,"__notebookUri":"file:///Users/~/Documents/notebook.ipynb","__sessionId":"8fe949c3-b305-4b2d-9f6b-746ea95f9c1c","connect":{"host":"127.0.0.1","port":"52117"},"logToFile":true,"subProcessId":20384}}}
21:45:37.512 [info] Cannot start debugging. Already debugging this notebook document.
@edervishaj edervishaj added the bug Issue identified by VS Code Team member as probable bug label Sep 9, 2024
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Sep 11, 2024

Sorry you are running into this issue.
Are you debugging a notebook cell or interactive window code?

Can you try to replicate this issue with a simple sample such as the following

print("Hello World");

def do_something(): 
    print("Inside")


print("Hello")
do_something()
print("Hello")

If you cannot, then its most likely some somethign in the Python code you are debugging thats causing this issue
Please can you share a minimal sample to repro this issue at my end (with few package dependencies or none at all).

@edervishaj
Copy link
Author

Sorry for my late reply. I am debugging a notebook cell. I think it might be related to Python code that launches another subprocess. The following minimal sample throws the same error when I stop the debugger after some time (due to debugger freezing and nothing happening):

#9886 (comment)

I have exactly the same issue.

@DonJayamanne
Copy link
Contributor

Let's close this as a duplicate

@DonJayamanne DonJayamanne added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster interactive-window-debugging notebook-debugging
Projects
None yet
Development

No branches or pull requests

2 participants