How to step through code in QT Creator

Hello all,

This is my first post. I am just now starting to work with PX4. I have done all the installations and everything and have been able to run px4 with gazebo/jmavsim. Now in order to get a better understanding of everything I would like to step through the code during the debugging process with QT Creator. I have set breakpoints in the source code, but when I think that they should be triggered they are not triggering.

For example:
I have set a breakpoint at int vtol_att_control_main(int argc, char *argv[]) inside of vtol_att_control_main.cpp and then when I call “vtol_att_control start” in the terminal I expect it to pause at the breakpoint, but it does not.

Any suggestions or guidance or criticism will be accepted. Thanks!

1 Like

Have you tried starting it with gdb like this?

make posix jmavsim__gdb

Would that debug through the terminal or through the IDE? I’d prefer to step through the code in QT Creator.

I have mostly used command line tools like gdb and lldb. I don’t know how to hook it up with QtCreator.