Debugging the ardupilot code base

Hi guys, i have one thing to ask…
What are some of the norms or ways to debug out the ardupilot code base…
Like i am working on firmware codebase of ardupilot and want to understand and customise its code according to my project needs.

Now like in stm32CubeIDE one can properly halt our code,set breakpoint, watch SFR, step into the code and see the whole debug stack of my Firmware and many other features of debug are their in Its GUI …which makes whole development and understanding time of firmware when working on with STM32 MCU either with HAL OR bare metal …lots easier.

I want to do same thing with Ardupilot Code base … mainly focusing on arducopter vehicle.
Want to step into my examples , halt it at different instructions so as to examine its status , want to see its debug stack at certain location by setting breakpoints.

So like i also see the documentation of ardupilot and had setup whole gdb and OPENOCD in too for Debugging out things via CLI in linux and windows both. And also in windows have setup eclipse for building and uploading my code (want to know how to set up debug configuration in eclipse for ardupilot codebase)

But things are not so clear from CLl and many functionalities are quite complex to understand and not so good as it is incase of STM32CUBEIDE.

So like i want to know what all ways/toolchains/norms are used by people for using debug and trace features in Ardupilot code base.

Is eclipse IDE setup used?
Or developers also used to prefer from CLI only?
If from CLI …so how did u guya proceed.

Just like I wrote on your copy of post on FB, wiki is your friend
https://ardupilot.org/dev/

I have gone through wiki and then only tried with gdb and openocd in cli…
Thus want to have suggestions does all developer used to to by that way as over CLI… Things seems little messy.

You may ask on DISCORD dev channel

Here are directions on how to use VSCode to debug using its graphical GDB debugger.

https://ardupilot.org/dev/docs/debugging-with-gdb-on-linux.html#vs-code

If you need to debug start up tasks such as object construction or parameter loading there is a different way to launch the debugging. It just hasn’t made its way to the wiki yet.

Hi guys, my issue is solved. I have successfully set up the toolchain and environment on windows using gdb and openocd for debugging by Ardupilot Firmware.
Just one thing I am not getting is that how should I generate the .map file for my code from .bin file or .elf file.

Hi Kunal,
As you mentioned above that you wanted to debug the Ardupilot similarly like you debug in stm32 cube ide.
Similarly, I also want to do the same.
You further mentioned that your issue is solved could you please elaborate your solution so that it could be useful for others who is searching for the same.
Thank you