Codeblocks Debugging - variables that do not appear in the clock window

I just started using code blocks and set up my user interface to have a clock window in the lower right corner of the user interface. I set a breakpoint and ran my program in debug mode. I can go through the lines of code using the buttons on the menu toolbar, but there are no variables in my clock window. I read somewhere that you can right-click and add global variables, but I also don't have this function. All that I have in the window of my watch is a button, when a message appears when I click on a message:

"Click the button to see the value. Hold ctrl to see the original output line returned by the debugger. Hold shift to see the debug view of the CBWatch object."

This button doesn't even seem to matter, though.

How to get varibles to display?

+4
source share
2 answers

When you start debug mode (the one that is activated by the red play button). The application will run as usual until it finds a breakpoint. After this breakpoint, you must click the "step forward" buttons. If you want to "see" the behavior of variables, then you should click the "Debuggin window" button (the one with the error that is next to the "stop debugger")

Then activate the “clock” and a new window will appear. In this window, you can even add specific variables that you want to track.

0
source

I guess you can see the clock window already. All you have to do is enter the variable name in the grid (inside the window). Only the name of the variable, the rest (data type, etc.) is automatically detected.

0
source

Source: https://habr.com/ru/post/1489997/


All Articles