G) From VSCode, Start Debugging (F5), and you will be prompted to select the process to attach to Hover to view descriptions of existing attributes.į) From a terminal, launch the python script which uses your module in a flowgraph Use IntelliSense to learn about possible attributes. If you are debugging the constructors of your module, then place the sleep before your importī) Set breakpoints in VSCode that you want to hitĬ) In VSCode, Debug -> Open Configurations brings up a "Set Environment" selectionĮ) Modify the configuration so that the program to debug is python (either python2 or python3 depending gnuradio branch).Place after the import statement for your module.This is useful for more complicated systems and flowgraphsĪ) (optional) Add a sleep into the python file "description": "Enable pretty-printing for gdb",Į) From the menu Debug:Start Debugging (F5) will start the python and land on your breakpoints!Īnother alternative is to attach to already running process. This brings up launch.json and inserts some codeĭ) Modify the configuration so that the program to debug is python (either python2 or python3 depending gnuradio branch). Like any other IDE with source level debugging, these can also be set while the code is free runningī) In VSCode, Click on the Debug Icon in the left panel (Triangle with a bug), and if one doesn't exist, "create launch.json file".The simplest way to achieve source level debugging is to launch the top level flowgraph (python file) from VsCode.Ī) Set breakpoints in VSCode that you want to hit py by changing the ID in options, generating the flowgraph, then changing the id back, so that direct changes to the python are not overwritten when the flowgraph is run from GRC In GRC, it is helpful to spool a temporary.Be sure when building the OOT module, use -DCMAKE_BUILD_TYPE=Debug as one of the cmake flags, e.g:ģ) Create a flowgraph that calls your module.The following instructions were updated using VSCode v1.63.2 on Ubuntu 20.04ġ) In VSCode Extensions Marketplace, install C++ and GDB Extensions (also Python Debugger for stepping through Python Code)Ģ) Build the target OOT module and install into the pybombs prefix (or whatever other install method was used for GNU Radio) Source level debugging OOT C++ modules with Visual Studio Code 1 Source level debugging OOT C++ modules with Visual Studio Code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |