Menu

#153 Debugger: watches window column widths are not preserved

Next_Nightly
applied
Debugger (27)
Patch
2016-01-30
2015-04-08
No

Watches dialog column widths are not preserved when switching between default and debug perspectives and if default perspective has no visible watches window. This is very annoying and time consuming when periodically stopping debug session and starting it again, because property grid columns became small, aligns to the right and does not fit contents.

Such behavior is erratical when the watches dialog is docked.
Best way to reproduce the problem is following:
1. Open project.
2. Open watches window and make it floating.
3. Move splitters in the watches window anywhere you like.
4. Close watches window.
5. Open watches window again.
Expecting:
Column widths are same as before.
Actually:
Column widths are reset.

The reason of such behavior is that property grid control receives multiple resize event before actual show and each event has different size parameters and may be (-1,-1). Each resize event causes property grid column fitting into event size.
Provided patch prevents property grid automatic column fit.
Tested on Windows 7 with wxWidgets 2.8.
Even if user resizes some column to a size larger than watches window or screen width then all of columns will be restored by WatchesDlg constructor next time Code::Blocks starts.

1 Attachments

Discussion

  • Teodor Petrov

    Teodor Petrov - 2015-04-08
    • labels: --> Debugger
    • assigned_to: Teodor Petrov
    • Milestone: Undefined --> Next Nightly
     
  • Teodor Petrov

    Teodor Petrov - 2015-04-16

    Hm, can't reproduce on CentOS 6.6, wx2.8, rev 10148.

     

    Last edit: Teodor Petrov 2015-04-16
  • Teodor Petrov

    Teodor Petrov - 2015-04-16

    But I think the bug happens on perspective change.
    Do I need to have watches added or does the bug happen with an empty window?

    If you can record a video with the steps it will be very helpful.

     

    Last edit: Teodor Petrov 2015-04-16
  • Teodor Petrov

    Teodor Petrov - 2015-04-16

    Hm, your patch fixes the perspective change issue, but introduces some unpleasant behavior. Now resizing the middle column moves the sizer for the right column. I'm not sure I like this behavior.

     
  • Sergey Bezgodov

    Sergey Bezgodov - 2015-04-16

    You don't have to add watches. It's reproducible with empty window.
    Yes, resizing first column moves other columns to the right, so other column sizes does not change. In a same way operate other windows which have listbox control with movable columns, e.g. Call Stack and Thread Search windows. So I believe such behavior change will not confuse most of users.

    Unfortunaly, this bug is not easy to reproducible when Watches windows is docked.
    I will try to make video, but not sure that can do it rapidly.
    Please, see attached screenshots.

     
  • Kevin xy

    Kevin xy - 2015-11-12

    I would like to report that I am experiencing this bug on Windows 7, SVN 10320.
    Here are my steps to reproduce it:

    1. Type in a C++ program with one int variable and one vector<int> variable.
    2. Use run-to-cursor on the last line of the main function to enter debug mode
    3. Resize first column in 'watches' window
    4. stop the debugger
    5. Use run-to-cursor on the last line of the main function to enter debug mode
     
  • Teodor Petrov

    Teodor Petrov - 2015-11-13

    Applied in r10564. Thanks for the contribution.

     
  • Teodor Petrov

    Teodor Petrov - 2015-11-13
    • status: open --> applied
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.