2

I know how to debug a console program, but what if the program has a GUI? For example, there is a Calc icon, when I push it down, it will call some methods. I want to know what methods it will call. I have the source codes but have no idea about which file corresponds to what, and want to back-track what codes it will implement if I click on the icon.

1
  • 2
    If you don't have source-level debugging, a typical GUI framework will be a nightmare. Get the source, (and, ideally, a 'real' IDE debugger:). Commented Feb 23, 2016 at 20:21

1 Answer 1

2

There conceptually isn't any difference between debugging a GUI application and a console application - they both come down procedural programming - some action calls a particular function. There's no difference whether the trigger of the action is you pressing a button on the GUI, or typing in a command in the console. You can use a debugger for both of them (visual or command line).

If you have the source, and know what the triggering mechanism is, it should be easy enough to follow along in the source code to see which functions are called by the trigger (eg. not at runtime). You have the question tagged as Qt, which uses the connect function to connect 'signals' (events) to either other signals or 'slots'. This is essentially associates a callback function, with a particular event, so searching your source for that would be a good starting place.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.