Recent

Author Topic: Poll: Watches and DisplayFormat => How do you think data should be displayed  (Read 6375 times)

440bx

  • Hero Member
  • *****
  • Posts: 3946
Short reply for now... will get into more details when I'm not so "squeezed" for time.

Quote
For instance the trick about "@textvar[0]" to not have every character individually enclosed in single quotes is quite useful
While it might be worth advertising, I wouldn't name it a "trick".

It is normal pascal syntax. You simply watch an expression that returns a "pchar" => so you get to see a pchar. (which is displayed as string)
I agree, "trick" isn't really a good description but, I can't think of a good one at this time.  "options" maybe ?

Maybe you can open a new topic on that (and moderate the topic), and see what others think.
I intend to do that.  Hopefully today or tomorrow.

In general, the debugger has tons of features that are probably seldom used.
I think the real challenge is in figuring out which features are seldom used because they are seldom needed compared to which features are seldom used because they are not common knowledge, e.g, the construct "Ptr[a..b]" is logical but, I didn't know about it and I wouldn't have thought of using it because it's not a valid Pascal statement.  Constructions like that are debugging pearls, extremely useful.

A related but slightly different note, I think that there is a natural fork occurring. By that I mean, FpDebug is really a different debugger than GDB and it will work differently, as a result, I believe that some features are forcefully going to be FpDebug only or GDB only and I think that's natural.   Honestly, at this point, I care very little about GDB.  I realize that's because on Windows FpDebug has gotten quite capable making GDB unnecessary but, that may not be the case on other platforms I don't use.  The point here is, at least on Windows, I think GDB is, in the majority of cases,  legacy stuff.

There are a couple of other things you said I should address, I intend to get to them as soon as reasonably convenient.  There are too many things in my head and some are leaking ;)

I like the new layout of the formatting options... I have about $0.02 worth of comments to mention... next post!

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Btw, it be a nice place to list all the intrinsics https://wiki.freepascal.org/FpDebug-Watches-Intrinsic-Functions
And the backends can have functions to list them.
But then it be nice, to also have some of those from gdb, if only to make use of the button.

On using features: If you need a field from an object, then you can open the object in the inspector => that has a filter (filters field names and data), so you can type "auto" to find any field (and data) containing "auto" => double click the desired one, and add it back as watch.
IMHO useful.
(filter in watches, whenever I find the time....)

Or, work a lot with variants? Configure the "variant backend convertor" https://wiki.freepascal.org/IDE_Window:_Ide_Options_-_Backend_Value_Converter#.22Convert_variant_to_value_type.22

It's documented...

440bx

  • Hero Member
  • *****
  • Posts: 3946
part of the problem is that I've only been using FpDebug since I learned that it supported DebugBreak() (which I only learned very recently.)  Since without that feature I couldn't use it, I didn't read the FpDebug documentation, consequently my knowledge of FpDebug is rather deficient and I need to correct that. 

The links you provided will most definitely be very helpful.

As far as the "Watch Properties" window, I tend to favor minimal designs.  In this case that means no dividers, just whitespace.  To my taste the dividers give a cluttered look.  The whitespace is usually enough (IMO) to create a visual separation among options.

I've attached a partially edited "Watch Properties" window.  I've left some of the dividers to show the contrast.  Personally, I'd get rid of all the dividers with the exception of the one that separates the "Memory dump" from the other options above.

I'd probably keep the small "dash" on the left hand side.

$0.02 :)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
I currently prefer the version where the radios are (starting on) the same line as the checkbox.

The lines can be fine tuned, 1 pixel, darker or lighter grey. But in general, the separation between groups is needed. (when there are several groups).

I currently have to rewrite some of the unlaying code...
And then incorporate the option of showing/hiding leading zeros.

I thought of various other ways....

1) Take a away the "signed-ness" and have global settings where the user can define "MyHex as hex-signed-no_lead_zero" and then that would be in the list...
2) Have the minimal preconfigured num-formats, and an edit, similar to "format", allowing to specify in text form, signed-ness, base, lead_zero, ....

But then gave up on them again (at least for the moment, until I see where I can get without them).
One thing is, that at least Decimal should be easily available in the following forms: "signed as the type of data", "always signed/cast to signed", "always unsigned" (that is one more that even existed in the old dialog. And so the minimal preset becomes a lot already.

Anyway, lets see where my current idea takes me.

 

TinyPortal © 2005-2018