How to do gio command execution line by line debug step through

Asked by Stephen

Because after many days no one has an answer in my thread at:
https://answers.launchpad.net/ubuntu/+question/705063
it has become necessary for me to step through the gio command's execution to find out why it fails in only my primary account, but works as expected in all others. I am an experienced C, and C++, coder, and have done step through for debugging in my own code many times. But this will be the first time I have ever done this in a Linux library command. And so I have many questions:

1) I am accustomed to two different types of builds, a debug build containing required debug symbols, and a release build intended for public release. This raises the question whether the prebuilt binary package at:
https://packages.ubuntu.com/jammy/libglib2.0-bin
can be stepped through as is. Can it?

2) If a debug compile of libglib2.0 were necessary, and if I were to compile a debug version of it, what risk would there be to my current Ubuntu 22.04 (jammy) installation? Can the executable compiled for debug purposes be kept separate from the precompiled binary that comes with an Ubuntu installation?

3) What is the appropriate compiler to use?

4) Which is the best IDE to use for this debug purpose? Which is the one Ubuntu developers usually use?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

All Ubuntu packages are compiled with debug support, but the debug symbol packages are separate and are not installed by default. If you want to debug an Ubuntu-provided program, then you have to add the debug symbol packages for that program (and eventually the libraries used).

see https://wiki.ubuntu.com/Debug%20Symbol%20Packages

Can you help with this problem?

Provide an answer of your own, or ask Stephen for more information if necessary.

To post a message you must log in.