Debugging and Modifying using CubeOrangePlus

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.

And also i want to change the sensor Lightware lidar LW20/C to the one which is needed in my project?

So anybody could help me with both of these problems.

This might help:

https://ardupilot.org/dev/docs/building-the-code.html#building-the-code

https://ardupilot.org/copter/docs/common-oem-customizations.html

Yes, I have already went through them and i can debug only SITL but i need to debug the whole code in real time.
And the OEM custumization I’ll check it out.
Thanks