When Cursor starts, I receive the following error messages in the output panel repeatedly:
Code: -32603
[Error - ...] Pylance client: couldn't create connection to server.
Message: Request initialize failed with message: You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications. The software is licensed, not sold... (rest of the license text)
seems Pylance’s licensing checks does not recognize Cursor as VS Code (derivative).
The Pylance version you have is likely newer than Cursor supports right now, but was brought over from your VSCode installation - uninstalling and reinstalling it from the extension library should fix this up
Thank you for your reply. I appreciate it. Sadly, that did not work. I had to do the steps I document below. It does not seem the Cursor team does effective testing of integration of debugging support. This has been a problem since I started using Cursor and you are the first to reply.:
Adding Debugpy to Cursor for Python Debugging
By default, Cursor’s Python extension does not include the debugpy
package. To enable Python debugging, manually copy debugpy
from VS Code’s extension directory into Cursor’s Python extension directory.
Steps:
1. Install the Python Debugging Extension in VS Code
-
Open VS Code.
-
Install the “Python Debugger” extension (which includes debugpy
).
-
This will create a folder named ms-python.debugpy.***
in:
C:\Users\<YourUsername>\.vscode\extensions\
2. Locate the Corresponding Cursor Extension Directory
-
Navigate to the Cursor extensions folder:
C:\Users\<YourUsername>\.cursor\extensions\
-
Find the Python extension, which has a name like:
ms-python.python***-universal\
-
Inside this folder, go to:
pythonFiles\lib\python\debugpy\
-
If these subdirectories don’t exist, create them manually.
3. Copy Debugpy Files
-
Open the VS Code extension folder:
C:\Users\<YourUsername>\.vscode\extensions\ms-python.debugpy.***
-
Copy all files and subfolders from there.
-
Paste them into the debugpy
folder inside Cursor’s Python extension:
C:\Users\<YourUsername>\.cursor\extensions\ms-python.python***-universal\pythonFiles\lib\python\debugpy
After this, Cursor should be able to run Python debugging using debugpy
.