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

Cannot set breakpoints when debugging scripts #145

Open
cmelchiorre opened this issue Jul 11, 2023 · 1 comment
Open

Cannot set breakpoints when debugging scripts #145

cmelchiorre opened this issue Jul 11, 2023 · 1 comment

Comments

@cmelchiorre
Copy link

I've configured vs code for Blender development. The following is my configuration:

Blender 3.4.1
Visual Studio Code 1.80
Blender Development extension v0.0.18
Python 3.10.8
fake-bpy-module-latest 20230517

I can start Blender and run scripts, but when debugging, if I set a breakpoint, this appears as excluded (dark bullet with white border instead of a red bullet).

The text message hovering over the breakpoint says:

Breakpoint in file excluded by filters.
  
Note: may be excluded because of "justMyCode" option (default == true).Try setting "justMyCode": false in the debug configuration (e.g., launch.json).

But adding "justMyCode" = false to launch.json doesn't change anythinhg:

This is my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Blender",
            "type": "python",
            "request": "attach",
            "port": 5678, //careful, this used to be 3000 in older versions of vscode and this addon
            "host": "localhost",
            "justMyCode": false
        }
   ]
}

Output window:

Error: there is no registered task type 'f712011c67'. Did you miss installing an extension that provides a corresponding task provider?

Terminal window:

Read prefs: C:\Users\<my username>\AppData\Roaming\Blender Foundation\Blender\3.4\config\userpref.blend
[{'load_dir': 'e:\\Software\\Blender\\3.4\\python\\workspace\\test_addon', 'module_name': 'test_addon'}]
 * Serving Flask app 'Blender Server'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:8726
Press CTRL+C to quit
Sending: {'type': 'setup', 'blenderPort': 8726, 'debugpyPort': 8762, 'blenderPath': 'e:\\Software\\Blender\\blender.exe', 'scriptsFolder': 'e:\\Software\\Blender\\3.4\\scripts', 'addonPathMappings': [{'src': 'e:\\Software\\Blender\\3.4\\python\\workspace\\test_addon', 'load': 'C:\\Users\\<my username>\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\test_addon'}]}
Waiting for debug client.
Debug client attached.

Debug console:

Debug client attached.
@dimateos
Copy link

Maybe related to #140

Maybe your source is in "e:\Software\Blender\3.4\python\workspace\test_addon", and if you add breakpoints to those files they should be normal red dots. You can try to place them there without running blender etc.

Then during execution vscode opens the file but in the mapped path "C:\Users\\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\test_addon". Seems like that path is excluded by some of your filters or something idk.

Probably if you set breakpoints in "e:\Software\Blender\3.4\python\workspace\test_addon" then the execution will be stopped at those places even if the file that pops up is in "C:\Users\\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\test_addon" and seems to have none, in this case the breakpoints get kind of mirrored.

I noticed you are working with multiple drives e and C thats is also proably another thing that may fail. This addon uses Junctions to simulate your addon being inside the addons folders too, but iirc junctions can work across drives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants