Python debugger doesn't launch

I am trying to debug an extremely simple python file:

print('hi')
print('hello') # debug line set here

with an extremely simple debug launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

When I press F5, nothing happens. When I go to the Run and Debug panel, and click on the debug play button, nothing happens.
And I really mean absolutely nothing happens: no popups, no errors, no messages, no debug terminal, no logs (that I can find), nada.

2 Likes

Great description 152334H!

Exactly the same here problem here. Debugging the exact same script works in vscode, so I simply go use it when needed.
Did anyone perhaps figure it out? Any hints? My setup is Big Sur, mid 2015 macbook pro, latest cursor of course…

1 Like

Did you find a solution to this problem?

I’ve found this problem recently as well. Windows, it worked for a long time, now it does not. I’ve tried wiping cursor and all settings in %appdata% etc.

I installed vscode, it works fine.

New empty directory with no launch.json. test.py does nothing but print hello world. If I choose “run” it runs fine. If I chose “debug python file” the debug bar flashes briefly, then disappears.

Output>>Python shows just:
2024-06-30 00:57:22.683 [info] DAP Server launched with command: C:\Users\dan\AppData\Local\Programs\Python\Python310\python.exe c:\Users\dan.cursor\extensions\ms-python.python-2023.14.0-universal\pythonFiles\lib\python\debugpy\adapter

I’ve also un- and re-installed the python extension, python itself, rebooted, un-and-reinstalled cursor several times. I created a new windows user account, installed fresh there, same problem.

Help!

I’m re-bumping this because it’s been a week with no reply.

I have the same issue using a Node Typescript codebase on a Macbook Pro M3 running Sonoma 14.5.

My launch.json looks like:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "attach",
            "preLaunchTask": "npm: debug",
            "name": "Attach debugger",
            "port": 9229,
            "restart": true
        }
    ]
}

It does work in Visual Studio Code.

Just updated to 0.38.0 and debugging works!

Debugging stopped working for me when i updated to 40.2

Ditto. Can we get some attention on this.

Same problem here. Looking for older versions

I finally hacked my way around this. The directory:
C:\Users\dan\AppData\Local\Programs\Python\Python310\python.exe c:\Users\dan.cursor\extensions\ms-python.python-2023.14.0-universal\pythonFiles\lib\python\debugpy\adapter

didn’t exist - the \lib subdirectory wasn’t there. But I found this elsewhere on the machine (vscode install? not sure):
\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy
renamed libs to lib, put it where cursor was expecting to find it, anda gainst all odds it worked.

1 Like

I’m having this same issue with the python debugger. It would be great to address this issue because we’re currently unable to debug Python apps.

1 Like

Same problem. In my case using python3 from XCode on Mac - working fine in VSCode. Seems to be having trouble saving keys? Also output seems to show trying to run python (not python3) at some point even though debug environment launches using python3

2024-09-29 12:51:14.812 [info] Experiment 'pythonaa' is active
2024-09-29 12:51:14.812 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-09-29 12:51:14.812 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-09-29 12:51:14.812 [info] Experiment 'pythonTestAdapter' is active
2024-09-29 12:51:14.812 [info] Test server listening.
2024-09-29 12:51:14.820 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2024-09-29 12:51:14.820 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2024-09-29 12:51:14.820 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2024-09-29 12:51:14.820 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2024-09-29 12:51:14.823 [info] > python -c "import sys;print(sys.executable)"
2024-09-29 12:51:14.826 [error] [Error: Command failed: python -c "import sys;print(sys.executable)"
/bin/sh: python: command not found

Actually that’s a red herring. Set up a venv and those errors went away, but still doesn’t debug despite seeing this output

DAP Server launched with command: [projpath]/.venv/bin/python 
1 Like

I am using Cursor Version: 0.41.3 and Python Version:3.12.4, debug does not work, but VS Code debug works fine.

I am having same problem with Cursor Version: 0.41.3 and Python Version:3.12.7

I am facing the same issue and getting this error message when attempting to install the Python Debugger extension:

"[/Users/myname/.cursor/extensions/ms-vscode-remote.remote-ssh-0.115.0]: Extension is not compatible with Code 1.91.1. Extension requires: ^1.93.0."

Would appreciate immensely if someone could look into this?

Same problem here. Python debugger starts but does nothing. In VS Code, it works perfectly.

Is there any update on this?

1 Like

I have the same experience.

I love the autocomplete and tab features which is why I keep coming back to Cursor.

However, the lack of a working debugger is a deal breaker for me. Continuously switching between Cursor and VS Code is too annoying.

If the problem is still not fixed by the end of my subscription term, I am afraid I will cancel it :frowning_face:

Me too.