How to Debug? GDB Not Recognizing Source Files for 3D Slicer Debug Build

I’m using the debug build of 3D Slicer for enhanced debugging capabilities but face issues with GDB not recognizing some source files, hindering my debugging. Despite building 3D Slicer with debug flags and attempting to set breakpoints in specific files like /slicer/Slicer/Modules/Loadable/Markups/MRML/vtkMRMLMarkupsLineNode.cxx , GDB fails to recognize these files, asking to make breakpoints pending on future shared library loads. This approach hasn’t resolved the issue. It’s confusing why GDB inconsistently recognizes source files despite being in debug mode. I’m using the SlicerApp-real binary for debugging, which differs from the regular release Slicer binary. I need an advice on debugging this project or at least understanding the cause of these issues. Attempts to debug with QT on Ubuntu 20.04 resulted in errors, preventing QT from running the project. What can I try to debug Slicer 3D to?

@Aram_Harutyunyan, the bottom line is that Slicer uses a launcher that sets the environment and runs SlicerApp-real. There is a few ways one can go about debuggin Slicer in here: C++ debugging on GNU/Linux systems — 3D Slicer documentation