User forums > Help

Display Value Under Cursor - window too small for int variables with short names

(1/6) > >>

oldieNewbie:
I am experiencing a problem with Display Value Under Cursor in the debugger.
Best explained with a screen capture, I think. It shows the whole program at one point in time.

In Frame 1, the variable under the cursor is x which is declared as "int x {1};"
The value window appears to be mostly a working horizontal scroll bar.

In Frame 2, The value of a variable m declared as a double is correctly displayed.

In Frame 3, when I increased the length of the int variable's name to 4 characters ("x123")  the value is readable and the scroll bar disappears.

In Frame 4, in the case of a loop control variable "i" a description of the variable "int main ::i" appears for a few milliseconds and then changes to what is shown.

Further experiment showed that if I assigned a value of 1234567890 to x, the value window would display "x 12345678 int"
It seems that the value window is not displaying short names with small values at all, and truncating larger values when the variable name is short.

I appreciate that adding variables to the watch window is the work-round for this.

Using version 20.03-r11983   Build: Mar 14 2020, 18:11:34 - wx3.1.3 - gcc 8.1.0 (Windows, unicode) - 64 bit

oBFusCATed:
OS and CodeBlocks versions please? What is the DPI of you monitor? Do you change global font sizes?

oldieNewbie:
Using version 20.03-r11983   Build: Mar 14 2020, 18:11:34 - wx3.1.3 - gcc 8.1.0 (Windows, unicode) - 64 bit
Windows 10 Home version 1909 OS build 18363.720
Display resolution 1920 x 1080
I have not changed global font size but did change the value tooltip font to Calibri Regular 10 in the Debugger Common Settings
I have just looked for a default font setting but cannot find one.

oBFusCATed:
Close CodeBlocks.
In AppData there should be a CodeBlocks folder and there a default.conf file.
Open it and find something like

--- Code: --- <TOOLTIP_FONT>
<str>
<![CDATA[Comic Sans MS 8]]>
</str>
</TOOLTIP_FONT>

--- End code ---

Delete this, start Code::Blocks and report if it fixes the problem.
Also remember the setting and post it here.

oldieNewbie:
I have done everything you suggested but it has not fixed the problem, in fact it has made it slightly worse, as the value 1234567890 is now displayed as 1234567, a digit shorter than before.
The text is visibly smaller in the value window that does display text (the reason I changed to Calibri 10).

I located
C:\Users\David\AppData\Roaming\CodeBlocks\default.conf
and made a copy before I deleted

--- Code: --- <TOOLTIP_FONT>
<str>
<![CDATA[1;9.75;-13;0;0;0;400;0;0;0;0;3;2;1;34;Calibri]]>
</str>
</TOOLTIP_FONT>

--- End code ---

Should I restore this code, or would uninstall and reinstall CodeBlocks be likely to fix the problem?

Navigation

[0] Message Index

[#] Next page

Go to full version