Hello!
Even though GNU Radio has python bindings with swig or pybind11, the underlying code c++ symbols are still accessible with GDB. Using Visual Studio Code and GNU Radio compiled from source with Debug Symbols this is pretty straightforward:
1) Open up the source tree of gnuradio in visual studio code
2) edit the launch.json and add a C++/GDB configuration where program is python and args is the output of the GRC rendering
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/python3",
"args": ["/path/to/grc_output.py"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
3) put the breakpoint where you want to hit - note that GR will have been compiled with optimizations, so the breakpoints might be a bit funky
4) F5 to run the application
If you are debugging your own OOT, this makes it even simpler because you can compile as "-DCMAKE_BUILD_TYPE=Debug" and then your breakpoints will be very predictable - in this case you just open up VS code from the root of your project and follow the same steps.
Hope this helps.
Josh