Recent

Author Topic: Locals Window and Display format / Ideas?  (Read 961 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Locals Window and Display format / Ideas?
« on: February 16, 2024, 08:52:26 pm »
The locals window currently does not allow changing display formats.
Of course it would be nice if it did....

But, how to deal with it?

Say you have a variable "X: integer", and you display it in hex. -> great. Now you keep stepping. Eventually you either step into another function, or out of the current function (or run to a breakpoint in another function...)

Let's say you STEP INTO a function. So that eventually you will step back out into the current.

Then...

1) There could be no  "X" at all.
Ok, no problem, lets just remember "X = hex", and if there later will be an "X" again (because you stepped out), then that works.

2) There is an X: string, then "hex" has no effect
3) There is an X: integer, but it has a different meaning, and you need it in decimal.

In (2) storing "X = hex" would still work, so long as you don't won't to see the string in a diff format.
But for (3) you would change the format, and you have to change it back later.

In principal that all works.

And it actually is the same with watches (except you can have 2 watches with diff formats for the same value). You just may be forced to change the format over and over...


Ideas how to do better?

lainz

  • Hero Member
  • *****
  • Posts: 4616
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Locals Window and Display format / Ideas?
« Reply #1 on: February 16, 2024, 09:46:25 pm »
Maybe a combobox that affects everything at top? Say show hex, or show decimal?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Locals Window and Display format / Ideas?
« Reply #2 on: February 16, 2024, 10:26:31 pm »
Maybe a combobox that affects everything at top? Say show hex, or show decimal?

Well that only works, if you want all locals in the same format.
If different locals have different formats, then info needs to be kept per local (and/or per local-not-in-the-list-anymore).

A combobox (or context menu) may come in useful as a quicker way to change the displayformat => but once changed it needs some way of sticking when the debugger steps/runs.

 

TinyPortal © 2005-2018