[SOLVED] Is it even possible to debug both python and c code in the same workflow?

I’m trying to debug nodes API and some calls are cross-language.
Some calls are easy to catch via bindings, but they’re not always obvious.

Snd they’re some esotetic cases, like the line self.node_tree = newtree updating user counters.

You can on windows, but the setup is less than straightforward.

1 Like

You also can on linux (and I assume on MacOS as well) using Visual Studio Code. Unfortunately, I don’t have a cross platform setup. In general it worked for me like so:

  1. Launch Blender with an attached debugger from within vs code.
  2. Attach the Python Debugger to the running Blender instance. For that you have to install and start then ptvsd package in Blender and then connect to the opened port from within vs code.

I automated this process in my vscode extension for Blender development. However, this is not part of the “official” functionality.

2 Likes

Yay! It works!
Thanks!

(If only it could also ‘step into’ from python to c…)