Menu

#1586 Font size in debugger windows is excessively large and cannot be changed

Undefined
fixed
nobody
None
Bug_Report
2026-02-17
2026-02-12
RoyalX
No

Name : Code::Blocks
Version : svn-r13785
SDK Version : 2.25.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : https://www.codeblocks.org
OS : Windows 11 (build 26200), 64-bit edition
Scaling factor : 2.000000
Detected scaling factor : 2.000000
Display PPI : 192x192
Display count : 1
Display 0 (\.\DISPLAY1): XY=[0,0]; Size=[2880,1620]; Primary

wxWidgets Library (wxMSW port)
Version 3.2.8 (Unicode: wchar_t, debug level: 1),
compiled at May 23 2025 17:23:13
Runtime version of toolkit used is 10.0.26200.

Description:
There appears to be a broken font size mechanism in debugger windows. The font displayed in various debugging interface elements is extremely large and cannot be adjusted through any available settings.

Affected components:

  • Evaluate expression under cursor tooltip (hover over variables during debugging)
  • Call Stack window
  • CPU Registers window
  • Memory Dump window
  • Running Threads window
  • Watches window
  • Breakpoints window

Working correctly:

  • Disassembly window - correctly uses the font size specified in Settings → Editor → Font

Configuration issue:
The setting Debugger settings → Common → Value Tooltip Font appears to be non-functional. Changing the font size in this parameter has no effect on:

  • The "Evaluate expression under cursor" tooltip
  • Any of the affected debugger windows listed above

Suspected cause:
This appears to be a complete breakdown of the font size selection mechanism for debugger windows. The issue may be related to incorrect monitor scale detection in the high DPI display handling mechanism.

Expected behavior:
The font size in all debugger windows should either:

  • Respect the "Value Tooltip Font" setting in Debugger settings
  • Use the same font size as specified in Settings → Editor → Font
  • Provide a separate, functional setting to control debugger window font sizes

Discussion

  • RoyalX

    RoyalX - 2026-02-12

    Evaluate expression under cursor

     

    Last edit: RoyalX 2026-02-12
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-13
    • assigned_to: Miguel Gimenez
     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-13
    • status: open --> pending
     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-13

    Dialogs fixed in [r13787].

    The tooltip part is pending (patches welcome).

     

    Related

    Commit: [r13787]

    • RoyalX

      RoyalX - 2026-02-14

      patches welcome

      On SourceForge everything feels so confusing and deliberately overcomplicated, unlike GitHub, that it completely discourages contributing to the source code. It seems that just understanding the structure of the C::B project and building it from source would require an enormous amount of time.

       
      • ollydbg

        ollydbg - 2026-02-14

        C::B is still using svn, and I suggest C::B to use git. And we can have pull request like in github.

        While, building C::B under C::B is simple, I'm not sure how you build C::B.

         
        • RoyalX

          RoyalX - 2026-02-14

          Yes, I agree with you that it’s quite easy to create a pull request on GitHub — you just fork the repository, make your changes (patches), and then submit a pull request.

           
  • pecan

    pecan - 2026-02-16

    I'll see if Gemini 3 will tell me why the ValueToolTip font is too big.

     
  • pecan

    pecan - 2026-02-16

    Gemini 3 is suggesting this change. I'll apply and test for awhile.
    Any comments about this would be appreciated.

    ✦ The function cbDebuggerCommonConfig::GetValueTooltipFont() works by retrieving the system's default GUI font, reducing its size by 3 points (with a
    minimum of 7 points), and returning this smaller font description string unless a custom font is saved in the configuration. The reason the tooltip
    font appears too big is that this function is not actually used in the ValueTooltip class constructor in src/src/watchesdlg.cpp. Consequently, the
    tooltip displays using the standard, larger system font instead of the intended smaller font.

    To fix this, you should modify the ValueTooltip constructor in src/src/watchesdlg.cpp to apply the font returned by GetValueTooltipFont().

    Here is the plan:

    1. Modify src/src/watchesdlg.cpp to include the SetFont call in the ValueTooltip constructor.

    Apply this fix:

    ? Edit src\src\watchesdlg.cpp: m_grid = new wxPropertyGri... => m_grid = new wxPropertyGri... ←

    1336 m_grid = new wxPropertyGrid(this, idTooltipGrid, wxDefaultPosition, wxSize(200, 200),
    1337 wxPG_SPLITTER_AUTO_CENTER);
    1338
    1339 + wxString fontStr = cbDebuggerCommonConfig::GetValueTooltipFont();
    1340 + wxFont font;
    1341 + if (font.SetNativeFontInfo(fontStr))
    1342 + m_grid->SetFont(font);
    1343 +
    1344 long extraStyles = 0;
    1345 #if wxCHECK_VERSION(3, 0, 3)
    1346 extraStyles |= wxPG_EX_ALWAYS_ALLOW_FOCUS;

     

    Last edit: pecan 2026-02-16
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-17

    I saw cbDebuggerCommonConfig::GetValueTooltipFont() was never called outside configuration, but did not find where the tooltips were created. I see now they are property grids in popups, strange...

    Good job.

     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-17
    • assigned_to: Miguel Gimenez --> nobody
     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-17

    IMHO using FromDIP(wxSize(200, 200)) in line 1336 is better for HiDPI.

     
  • pecan

    pecan - 2026-02-17

    Yesterday and today I've run the the following patch with three different debuggers (debugger_gdb, debugger_gdbmi, and debugger_DAP) and they all appear happy:

    m_grid = new wxPropertyGrid(this, idTooltipGrid, wxDefaultPosition, FromDIP(wxSize(200, 200)),
                                wxPG_SPLITTER_AUTO_CENTER);
    
    wxString fontStr = cbDebuggerCommonConfig::GetValueTooltipFont(); //Geimini 2026/02/16 4 lines
    wxFont font;
    if (font.SetNativeFontInfo(fontStr))
        m_grid->SetFont(font);
    

    So, Miguel, if you agree, please format and apply the patch with your FromDIP change.
    Thanks.

     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-17
    • status: pending --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2026-02-17

    Fixed in [r13794].

    Fixed also popup's size in HiDPI.

     

    Related

    Commit: [r13794]


Log in to post a comment.

MongoDB Logo MongoDB