-
Notifications
You must be signed in to change notification settings - Fork 36
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
Debugger is attached but can't stop on breakpoints #28
Comments
I found that if I move my python source code file on c:, everything works. |
Where was the script located and where did you move it to that it now works? Also running scripts from Blender can be a problem. I remember some potential workarounds were discussed in #4, but I never got around to investigating. |
What solved the issue for me was to change the auto-generated VSCode launch.json file. Specifically, {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}" // I think this did the trick
}
],
"justMyCode": false
}
]
} |
Change |
Had the same issue. |
I will see if I can reproduce this and add it to the docs if so. Also @rlneumiller that is from a separate VS Code extension and not an internal setting of VS Code. |
I have the same problem and unfortunately, setting the path as @DaseinPhaos suggested did not work for me. |
OS: Windows 10
Add-on Version: 2.2.0
Blender Version: 3.2.1
VS Code Version: 1.69.2
VS Code Python Extension Version: v2022.10.1
Paths listed by
where python
or the corresponding command:where python
C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\bin\python.exe
C:\Program Files\FreeCAD 0.18\bin\python.exe
C:\Users\carolisa\AppData\Local\Programs\Python\Python310\python.exe
Does VS Code / Visual Studio connect to the troubleshooting script?
Yes
Python path/interpreter detected/selected by VS Code/Visual Studio:
C:\Users\carolisa\AppData\Local\Programs\Python\Python310\python.exe
Blender and VSCode connect succesfully ( see picture attached ).
But if I set a breakpoint on VsCode (on the print("test") statement) and I run the script with Alt-P on Blender, the breakpoint is ignored.
The text was updated successfully, but these errors were encountered: