Poll: Watches and DisplayFormat => How do you think data should be displayed lazarus / 12-Debugger ---------------------------------------------------------------------- Martin_fr · 2024-02-07 21:28 For each data type (integer, class, record, ...) the watches Window has some way to display it. Some people will like very verbose, others rather condensed output. There may be many preferences. This poll is to help me understand what those preferences are. (It is not a vote). What it is not about. Anything that falls into the below categories, please do not add to this topic. Thanks. 1) Content, rather than Format:   I know "properties" are not currently shown, I agree they should. But that is not about the DisplayFormat.   I know "interface" shows empty. Not a format issue. 2) Stack, Threads, Evaluate, Inspect window.   This is only about Watches and Locals (and maybe/probably eval in Editor-Hints) 3) Color or font-style   Just text. E.g. "Foo=1" vs "Foo = 1" vs "Foo: 1" 4) Not about specific types   TDateTime is  floating point and show as such => there needs to a better way. But in this topic, this would be how should all/any data of type float be shown.   TPoint/TRect will be handled the same as any other "record"   Individual display rules for such types are important => but not part of this topic 5) The ability of expanding/collapsing a value with the [ + ] / [ - ] icons 6) Customizable config (beyond the choice of DisplayFormat). A valid point, but not this topic. 7) Bugs   If any data currently is displayed buggy => Bug tracker please. 8) Partly not: Shortcomings of gdb based debugging (or any debugging without FpDebug in the name). Those can be listed, but the main target is formatting when/if FpDebug is involved. If you have questions or suggestions on any of those, please open a new thread. What it is about. Watches have a DisplayFormat ("type" in the watch properties). Locals and Hints use the default DisplayFormat. An Integer watch can be accordingly displayed as decimal, hex, bin, ... For records classes, there is default vs structure. The values are then (or can be) printed in different ways. E.g. should numbers have in some format thousand seperators? Should structures (or nested structures) have fieldnames, should it be colon or equal, .... So if anyone has ideas of what the would prefer, the entry should include - type of data: ordinal, floating-point, record, object, class, boolean, enum, set of, array, .... - current output - desired output Exception to point (7) above: Maximum display length (before cut off) for strings. Or strings in (nested) structures. Or arrays, nested arrays.... Those may depend on DisplayFormat and if the data is stand alone, or in a structure or array. Thanks for any feedback. EDIT: Suggestions for the editor-hint or locals Windows => please mark accordingly. Default assumption is the Watches window. Below is a summary of the suggestion - todo, not yet in 3.99 (To be updated occasionally) https://forum.lazarus.freepascal.org/index.php/topic,66143.msg505542.h tml#msg505542 440bx * For records/structures in multi-line print (e.g. in editor-hint):   - One field per line Awaiting clarification   - horizontal (table) align columns for labels and data. https://forum.lazarus.freepascal.org/index.php/topic,66143.msg505546.h tml#msg505546 440bx * When several numbers are printed vertical (array) then right align them (or align on the decimal dot). https://forum.lazarus.freepascal.org/index.php/topic,66143.msg508582.h tml#msg508582 440bx * "array of char" as string display. (including cut-of/deal-with trailing #0) https://forum.lazarus.freepascal.org/index.php/topic,66143.msg508632.h tml#msg508632 Nicole * Per watch switch for Date-time "watch visualizer" (print float as date) https://forum.lazarus.freepascal.org/index.php/topic,66143.msg509012.h tml#msg509012 avra * some form of quick-toggle between certain display formats   (also by 440bx for data/mem-dump toggle) https://forum.lazarus.freepascal.org/index.php/topic,66143.msg509474.h tml#msg509474 han * "len" prefix for nested array * :ord() intrinsic * Eval/Mod-Win: disable word-wrap for table display https://forum.lazarus.freepascal.org/index.php/topic,66143.msg509486.h tml#msg509486 han * 3 (or higher) dim array: Display in blocks, so Y can be used for 2nd or 3rd dimension (allow decision which dimension make x/y) https://forum.lazarus.freepascal.org/index.php/topic,66143.msg510643.h tml#msg510643 han * Watches: Make array toolbar optional, if array-len is less than one page Added "AutoHide" and default for PageSize, can be controlled in DisplayFormat settings https://forum.lazarus.freepascal.org/index.php/topic,66143.msg510651.h tml#msg510651 zvoni * list display for nested list See https://forum.lazarus.freepascal.org/index.php/topic,67980.0.html https://forum.lazarus.freepascal.org/index.php/topic,66143.msg511327.h tml#msg511327 440bx * Option to display address short / without leading zeros https://forum.lazarus.freepascal.org/index.php/topic,66143.msg511387.h tml#msg511387 440bx * Multi-line text representation: Option to multi-line nested values (at higher indent)   Also, nested Pointer should keep deref value as multiline (compare pane on images) https://forum.lazarus.freepascal.org/index.php/topic,6 6143.msg512401.html#msg512401 https://forum.lazarus.freepascal.org/index.php/topic,66143.msg512401.h tml#msg512401 440bx * review repeat count ---------------------------------------------------------------------- 440bx · 2024-02-07 21:56 Type of data: record Record fields in the watches window are shown horizontally.  That often forces the user to scroll horizontally to see more information (obscured fields/values that are on the right hand side) It would be really nice if the fields were shown vertically (one line per field).  This would probably require scrolling vertically sometime but, it would probably be easier to scroll vertically than horizontally. Another thing that would make inspecting the data a lot faster would be to have  the labels and the values justified in such a way that all the labels and the values are flush on the right hand side (like the output of my Pedump/Pebytes program.) Another very desirable feature (at least to me) is to have all integer fields displayed in hex instead of decimal.   It would be wonderful if there was some way to make that happen (either on the fly or some global setting.) Thank you for asking ---------------------------------------------------------------------- Martin_fr · 2024-02-07 22:06 Quote from: 440bx on February 07, 2024, 10:56:21 pmType of data: record It would be really nice if the fields were shown vertically (one line per field). Using FpDebug there is a [ + ] icon, and they can be expanded. There may be a question, if an option is needed to "auto expand", and if to only expand if the record (and similar class) has a minimum, or not more than a maximum number of fields. EDIT: On 2nd thought: you mean if displaying in the editor hint? QuoteAnother thing that would make inspecting the data a lot faster would be to have  the labels and the values justified in such a way that all the labels and the values are flush on the right hand side (like the output of my Pedump/Pebytes program.) Maybe an example? I don't quite follow. EDIT: On 2nd thought: you mean if displaying in the editor hint? QuoteAnother very desirable feature (at least to me) is to have all integer fields displayed in hex instead of decimal.   It would be wonderful if there was some way to make that happen (either on the fly or some global setting.) - As in a global setting to modify default display format? - As in an ability to set (on each watch) the displayformat for fields in an array/structure? EDIT: or display hex and decimal together (could make sense for values that are on their own line / maybe in the hint) ---------------------------------------------------------------------- 440bx · 2024-02-07 23:11 Quote from: Martin_fr on February 07, 2024, 11:06:09 pmUsing FpDebug there is a [ + ] icon, and they can be expanded. I'm glad you mentioned that.  I was using an older version of Lazarus which didn't have that.   I probably have about a dozen versions of Lazarus... I often don't even know what version I'm using.  Anyway... I started a project I'm working on with Lazarus v3.0 stable and got the + and - signs To make it easier to visualize what I'm talking about, I attached a screenshot. In the screenshot, it would be very nice if the "DECODER_MODE" (4th variable from the top) could be shown in hex instead of decimal (that mode is the result of or-ing a bunch of masks and seeing it in hex would definitely be helpful.) I think it would be nice (not to mention useful to some programmers) to have all integer fields default to be shown in hex. I think it should be a global setting because, I'd find it tedious to have to set it individually for each field.  One possibility that would be nice is to display it in the "other format" (hex if decimal or, decimal if hex) if the mouse is hovered over the value (maybe in a tooltip ?) The other thing that would be nice would be to "verticalize" the formatting of function/procedure types.  See the "FUNC_xxx" names towards the bottom of the screenshot.  Some of the prototypes require horizontal scrolling, it would be nice if there was a "+" sign to have the parameters and their type be one per line.  I have admit that, this is rarely an issue.  It just so happens that I'm working on something that uses callback prototypes but, it's not something I commonly need (unlike fields in hex... literally need that all the time.) The thing about aligning as in Pedump/Pebytes... here is a quoted output from that program Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  1-8000.0108            - IMAGE_NT_HEADERS -  1-8000.0108     108  [4]                            Signature : 00004550    (PE00)  1-8000.010c               - IMAGE_FILE_HEADER -  1-8000.010c     10c  [2]                            Machine :      8664 1-8000.010c +                      IMAGE_FILE_MACHINE_AMD64  1-8000.010e     10e  [2]                 Number of sections :         6  1-8000.0110     110  [4]                    Time Date Stamp : 5acc.fbb2    (2018/04/10 18:00:18)  1-8000.0114     114  [4]              Pointer to symbol table :         0 1-8000.0118     118  [4]                    Number of symbols :         0  1-8000.011c     11c  [2]              Size of optional header :        f0    (240)  1-8000.011e     11e  [2]                    Characteristics :      2022 1-8000.011e +                   IMAGE_FILE_EXECUTABLE_IMAGE           2 1-8000.011e +                IMAGE_FILE_LARGE_ADDRESS_AWARE          20 1-8000.011e +                                IMAGE_FILE_DLL        2000   1-8000.0120             - IMAGE_OPTIONAL_HEADER -   1-8000.0120     120  [2]                              Magic :         20b 1-8000.0120 +                 IMAGE_NT_OPTIONAL_HDR64_MAGIC  1-8000.0122     122  [1]               Linker Major Version :           e    (       14) 1-8000.0123     123  [1]                 Linker Minor Version :           d    (     13) 1-8000.0124     124  [4]                         Size of code :    1.1400    (   70,656) 1-8000.0128     128  [4]           Size of   initialized data :      5.6c00    (  355,328) 1-8000.012c     12c  [4]           Size of uninitialized data :           0  1-8000.0130     130  [4]                      Entry point rva :        8388    [Va: 1-8000.8388] [FO:   7788] [   .text] 1-8000.0134     134  [4]                 Base of code (rva) :        1000    [Va: 1-8000.1000] [FO:    400] [   .text]  1-8000.0138     138  [8]                           Image base : 1-8000.0000  1-8000.0140     140  [4]                    Section alignment :        1000    (    4,096) 1-8000.0144     144  [4]                       File alignment :         200    (      512) 1-8000.0148     148  [2]       Operating system major version :         6 1-8000.014a     14a  [2]       Operating system minor version :           0 1-8000.014c     14c  [2]                  Image major version :           0 1-8000.014e     14e  [2]                  Image minor version :           0 1-8000.0150     150  [2]            Subsystem major version :           6 1-8000.0152     152  [2]            Subsystem minor version :           0 1-8000.0154     154  [4]                Win32 version value :           0 1-8000.0158     158  [4]                           Image size :      6.c000    (  442,368) 1-8000.015c     15c  [4]                         Headers size :         400    (    1,024)  1-8000.0160     160  [4]                           Checksum :           0  1-8000.0164     164  [2]                          Subsystem :           3 1-8000.0164 +                         SUBSYSTEM_WINDOWS_CUI  1-8000.0166     166  [2]                DLL characteristics :         160 1-8000.0166 +                               HIGH_ENTROPY_VA            20 1-8000.0166 +                                  DYNAMIC_BASE            40 1-8000.0166 +                                     NX_COMPAT           100   1-8000.0168     168  [8]                   Stack reserve size :   10.0000    (1,048,576) 1-8000.0170     170  [8]                   Stack  commit size :        1000    (    4,096) 1-8000.0178     178  [8]                   Heap  reserve size :     10.0000    (1,048,576) 1-8000.0180     180  [8]                   Heap   commit size :        1000    (    4,096)  1-8000.0188     188  [4]                       Loader flags :           0  1-8000.018c     18c  [4]           Number of rvas and sizes :          10    (       16) Having numeric values right justified can really help visualize differences in magnitudes.  Of course, that's only applicable to numbers.  Closely related to that, numbers are usually much easier to read when they are displayed in a monospaced font (but it's a pain to have to output with multiple fonts, makes alignment more tedious, I'd consider that "nice to have" but, no biggie if the font is proportional.) I don't think that an "auto expand" is necessary.  The little + and - do the trick just fine (at least IMO.) It would be _great_ if the editor hint could be made - format-wise - closer (or very similar to) the way things are displayed in the watches window.  Currently the lack of alignment makes reading the information in the editor hint a bit cumbersome (screenshot attached as an example.) ---------------------------------------------------------------------- Martin_fr · 2024-02-07 23:30 Still fuzzy on the alignment.... In the hint, I can see where to put it. Well, once values in a structure a one per line. Then each line would be "FieldName: >>> Value" where >>> aligns the value. (Still tricky, since the debugger delivers the text, not font and/or painting / but that can be amended) In the watches Window, I am not so sure, when, how, what. In case of an expanded array (or if 2 equal types are just below one another), then I could see it (e.g. in a expanded "array of TPoint" to align the X and Y. => tricky though, since each value is formatted on its own. (and an expanded array, makes each element a value of it's own, that is needed to increase detail level, e.g pull in more nested arrays). Interesting idea non the less. I do understand the hex bit - though I disagree on "should always be hex". There are cases where decimal is needed. E.g. to see how many digits it has for an enduser. I currently don't have 10000 as hex in my head, and that is where 5 digits start. (e.g. debugging line number gutter of synedit). ---------------------------------------------------------------------- 440bx · 2024-02-27 11:56 From the thread https://forum.lazarus.freepascal.org/index.php/topic,6 6398.msg508570.html#msg508570 It would be nice if the characters in a null terminated array of characters were displayed without single quotes and without commas separating them. For instance, it would be nice if the attached screenshot had no single quotes (except for possibly one at the beginning and another one at the end) and no commas.  That would save a lot of space and make the character string much more readable. ---------------------------------------------------------------------- Nicole · 2024-02-27 17:14 Thank you so much for your work and this poll! 1) Please let me have a checkbox "display in dateformat". Often I have data in the format double, e.g. 45122. May be the compiler does not guess, it is a date. There I want to have the option "display as date" and see e.g. "25.4.2024" 2) Those not-shown properties and forbidden to talk about, sure, we all want them. What about a sorting for the first? If I let display all items of a component it is that verbose, that I give up to search for a certain value. What about sorting the view by alphabet or let me key in a search value? e.g. I want to see ibquery.sql.text => sort all post ibquery. by alphabet / or let me key in "text" anywhere. Not sure, if this is possible at all. ---------------------------------------------------------------------- Martin_fr · 2024-02-27 17:59 Quote from: Nicole on February 27, 2024, 06:14:21 pm1) Please let me have a checkbox "display in dateformat". Often I have data in the format double, e.g. 45122. May be the compiler does not guess, it is a date. There I want to have the option "display as date" and see e.g. "25.4.2024" In progress https://forum.lazarus.freepascal.org/index.php/topic,66186.0.html Currently you switch them on/off for a type-name (mind that "type foo=bar" does not create a new typename, but "type foo=TYPE bar" does. Per watch toggle is planed. More discussions on this, please ask on the linked thread. Quote2) Those not-shown properties and forbidden to talk about, sure, we all want them. Not forbidden... Just not on this thread. This here is about how to display data that is available. Unfortunately properties need changes in the compiler in order to become available. (For more details ask in a new thread please, in case of interest) QuoteWhat about a sorting for the first? If I let display all items of a component it is that verbose, that I give up to search for a certain value. What about sorting the view by alphabet or let me key in a search value? Generally possible, and nice idea. There are various places of sorting: - In the one line display (when the watch is not expanded) => though if you have that many fields then the one line view wont help. sorted or not. - In the multi-row expanded list For that I am also thinking of adding a filter. Much like already existent in the "inspect window". You can open the inspect window from the View>Debug-Windows menu, or the context menu of any watch. For an object it will display each field on a row => and it has a filter to search for fields, or text in the data. (always searches both) Once found, the row can be double clicked, and then added as watch. ---------------------------------------------------------------------- avra · 2024-02-29 10:49 Quote from: Martin_fr on February 27, 2024, 06:59:20 pmThis here is about how to display data that is available.While I expect to have a default representation of each data type, it would be nice to have a way for quick change of data representation without having to dig into some settings form each time. For example, numbers can be represented in decimal, hex, octal or binary form, and default could be decimal. It would be nice if I would be able to quickly change representation of a single variable (or even whole data type at once) with something like a simple SHIFT+CLICK which would simply loop through possible representations. That could be used for other data types as well (like single/datetime). It sounds like a nice way to avoid visual overload. ---------------------------------------------------------------------- Martin_fr · 2024-02-29 11:24 Quote from: avra on February 29, 2024, 11:49:01 amit would be nice to have a way for quick change of data representation without having to dig into some settings form each time. For example, numbers can be represented in decimal, hex, octal or binary form, and default could be decimal. It would be nice if I would be able to quickly change representation of a single variable (or even whole data type at once) with something like a simple SHIFT+CLICK which would simply loop through possible representations. There is certainly demand for it https://forum.lazarus.freepascal.org/ index.php/topic,66398.msg508697.html#msg508697 (about toggling mem- dump on/off). Maybe it can toggle between different user settings... E.g. - current/previous setting => though that would only cover 2 numeric formats. - global defaults for settings will come, then it could be: toggle specific watch settings vs defaults. Mind there is also the extend of what should get toggled... - the "display format" (aka style).   - including/excluding the mem-dump (because while advertised as display-format, it is different data (e.g. for non-packed records, it includes gaps) - the value-formatter https://forum.lazarus.freepascal.org/index.php/topic,66186.0.html - the value-converter (e.g. how variants are displayed) / again this is actually choosing to watch different data - settings like repeat count / again this is actually choosing to watch different data Yes, I am over-complicating it, but just to get opinions on which to base a decision. But I like the idea, not to have it in the context menu.... Also have a look at the toolbar in the evaluate dlg for 3.99. => Similar toolbar, but only show the settings relevant to the top-level value. top-level value => because for a structure you could chose "only values", "with field names", "full". So that (and if/how to show the address) are the structure values that could be in a toolbutton dropdown. Well, then again, for a structure you can change decimal/hex/bin too => it affects the display of numeric fields inside the structure... And then because decimal/hex/bin can be chosen for most watches (even if there top-lever property affects something else), those formats could have direct hotkeys, one for each format? Or their own drop-down, for mouse users (or context menu?) And just before the question arises: yes, whatever is chosen, it should/will work on multi-selection. ---------------------------------------------------------------------- han · 2024-03-01 19:59 Thanks all for the hard work on the debugger. For me the debugger has still a major problem. I'm writing and debugging math intensive astronomical programs. The watch displays the floats pretty rounded and is omitting for large values the decimals. This is highly confusing if you try to find small errors in the result. For example I have a float for the Julian day called jd_mid with value  2458372.043715278.  The day is 2458372 and the day part is 0.043715278 which is about one hour. This is displayed by the debugger as 2458372.  The floating part is missing in the watch.  See screenshot. I would like to have default the full precision like in GDB. If that is not possible this as an option. Han ---------------------------------------------------------------------- han · 2024-03-01 20:14 The same applies for the hints. This is also too much rounded. All important decimals are missing. See attached. ---------------------------------------------------------------------- Martin_fr · 2024-03-01 20:23 Quote from: han on March 01, 2024, 08:59:39 pm The watch displays the floats pretty rounded and is omitting for large values the decimals. This is highly confusing if you try to find small errors in the result. Have you tried Lazarus 3.2 ? This should be fixed with now showing 9 (single) and 17(double) digits. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40768 If you debug a 32bit app with "extended" then you need a 32bit IDE at the moment, since the 64bit IDE does not deal with that type. ---------------------------------------------------------------------- Martin_fr · 2024-03-01 20:28 Lazarus 3.99 also has - an option to show floats as "FloatToStrF(AResValue.AsFloat, ffExponent,  n, 0);". However fpc limits this to 15 digits. - the ability to show this as human readable date (though if it is stored as "double" rather than "TDateTime" then it would be for every variable of type double.    See https://forum.lazarus.freepascal.org/index.php/topic,66186.0.html / also for discussions on the "show as date" use that thread, please. ---------------------------------------------------------------------- han · 2024-03-01 20:43 Great. With Lazarus 3.2 this all working as desired! My problem is fixed. ---------------------------------------------------------------------- Martin_fr · 2024-03-01 21:54 Quote from: 440bx on February 07, 2024, 10:56:21 pmRecord fields in the watches window are shown horizontally.  That often forces the user to scroll horizontally to see more information (obscured fields/values that are on the right hand side) Sorry, have to ask for clarification (again).... Is that solved by the "[ + ] expand" of watches? (In hints, it is already multi-line, and in the "Inspect pane" too / the column align is todo) The whole idea of the watches window is to have a condensed view, allowing to see many watches in a list. The idea of the [ + ] toggle is to give the expanded view, when/if needed. If the height of each line would be extended, for showing watches multi-line (while not expanded) then we wouldn't need the ? What am I missing? --- Also check my summary, did I miss any other point? ---------------------------------------------------------------------- 440bx · 2024-03-01 22:03 Quote from: Martin_fr on March 01, 2024, 10:54:05 pmSorry, have to ask for clarification (again).... Please don't be... I'm the one who has failed to provide clarification. The best way for me "clarify" would be to a screenshot showing the way it currently displays it compared to a screenshot of what I'd like.  That would be a real clarification but, creating the screenshot of what I'd like takes a little bit of work and I'm currently in the middle of porting some C code and I want to finish that because that code's behavior is currently fresh in my mind. Bottom line: I owe you a clarification.  It will be the first thing I'll do after that port of C code. Sorry for keeping you waiting... ---------------------------------------------------------------------- Martin_fr · 2024-03-01 22:21 Quote from: 440bx on March 01, 2024, 11:03:59 pmSorry for keeping you waiting... Please, neither should you be. Besides, this is a long term project. Some stuff may fit in soon, other later. ---------------------------------------------------------------------- 440bx · 2024-03-01 22:26 Quote from: Martin_fr on March 01, 2024, 11:21:15 pmPlease, neither should you be. Thank you!. ---------------------------------------------------------------------- han · 2024-03-03 11:13 The debugger works very well. I have only a few minor remarks for the format of arrays: Editor hint. a) Why is a horizontal scroll bar displayed? b) The information len=3 is correct but it is a three dimensional array. Evaluate/Modify window   Perfect useful display of the array information by entering img[1,4..9,6..9] c) Why not a horizontal scrollbar? Watches window d) Adding img[1,4..9,6..9] to the Watches didn't work. e) Would personally prefer the Evaluate/Modify behavior/format to be copied to the Watches. The Watches display of arrays look smart but to me less useful then the displayed format in Evaluate/Modify window. Outside this topic, but I would like have the possibility to enter in the Evaluate/Modify and Watches expressions like sin(x), pi, ord('A'). Han ---------------------------------------------------------------------- han · 2024-03-03 11:56 One more remark. Two dimensional arrays defined as [0..height,0..width] are in Evaluate/Modify displayed as tables. As soon the array is three dimensional it is no longer displayed as a table. Assume the array is defined as [0..2,0..height,0..width] I would expect three tables of width x height. See screenshot. ---------------------------------------------------------------------- Martin_fr · 2024-03-03 13:09 Quote from: han on March 03, 2024, 12:13:05 pmEditor hint. a) Why is a horizontal scroll bar displayed? Very good question. Ignoring that the overall presentation could/should be improved, currently IIRC the debugger prints this as ONE single line. The IDE hint (not currently controlled by the debugger) should do the wrapping (or keep all in one line). In any case, having wrapping and scrolling => wrong. (bug report please, if you can) EDIT: scrap that. The debugger is wrapping, for each sub-array. The hint does not have word-wrap, so it adds a scrollbar. This will eventually have to be changed, but at the moment there are 2 independent stages. 1) the debugger create a string (with line breaks). The debugger is not aware of where or how this string will be printed (it only gets told, that the target supports multi-line / but has no idea how long a line can be) 2) The hint prints that string. (same in the eval/mod window) Quoteb) The information len=3 is correct but it is a three dimensional array. Ok.... However, in general each nested array can have a different length. So the first step would be to have a length in front of each nested (and sub nested) array Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Len: 3 (Len: 10 (1,2o3...), Len:15 (..... As an optimization, if all nested arrays have the same length, that could be pulled up to the top level. That however only works if the length of the top level is within certain limits. As you can see, if there are to many elements in an array, not all of them are fetched => and then any non-fetched could still have a different length. (there are settings in Tools > options > debugger backend -> how many entries to fetch) For static arrays, it should always be detectable. QuoteEvaluate/Modify window   Perfect useful display of the array information by entering img[1,4..9,6..9] c) Why not a horizontal scrollbar? Would a word-wrap checkbox be enough? There are cases where people may want wordwrap. "array [1..99] of string;" (very long strings) QuoteWatches window d) Adding img[1,4..9,6..9] to the Watches didn't work. Please create a bug report for that. Thanks. As a workaround: x[1][4..9][6..9] --- EDIT ---> Hopefully fixed in 3.99 (decision on merging to 3.4 still outstanding) Quotee) Would personally prefer the Evaluate/Modify behavior/format to be copied to the Watches. The Watches display of arrays look smart but to me less useful then the displayed format in Evaluate/Modify window. The watches Window has an "inspect pane" (but only one watch at a time". The idea for the watches window is to default to single line representation, unless the user expands that. Would I be right to assume, you want the "multiline text" from eval/mod shown in watches, if you press the [ + ]? If so, how many lines of text? (I mean an array [1..9999] would display a very large field, and all other watches below, would be hard to reach. Keep in mind, that this is not only a display change. The current expansion creates a new watch for each (displayed) entry of the array. - In case of nested data, the new watch goes one level deeper than its parent. - You can drag/drop individual entries from that list to become a new watch at top level. So if you are interested in "yourarray[7]" you drop that outside the expanded list, and it stays visible when you collapse the list. QuoteOutside this topic, but I would like have the possibility to enter in the Evaluate/Modify and Watches expressions like sin(x), pi, ord('A'). An intrinsic https://wiki.freepascal.org/FpDebug-Watches-Intrinsic- Functions for ord seems plausible (even though you can do "byte('A')" already. sin/pi => maybe... (mind as intrinsics they need the prefix, or if you switch that off, then they hide the real functions (if your rtl has debug info) You can add a feature request to the bug tracker. I added 2 of your points to the list. word-wrap awaits feedback. The rest is for the bug tracker, please.  (if word wrap is ok, you may also report that as feature request) ---------------------------------------------------------------------- Martin_fr · 2024-03-03 13:12 Quote from: han on March 03, 2024, 12:56:45 pmOne more remark. Two dimensional arrays defined as [0..height,0..width] are in Evaluate/Modify displayed as tables. As soon the array is three dimensional it is no longer displayed as a table. Assume the array is defined as [0..2,0..height,0..width] I would expect three tables of width x height. See screenshot. And if the array is defined as [0..height,0..width, 0..1] ? Then it would probably be better as it is now? The idea of having several outer blocks, each as a table of its own => generally good. But, how to know when to use it? ---------------------------------------------------------------------- Martin_fr · 2024-03-03 13:31 From the image (array control-bar in watches) QuoteWhat does this doht tps://wiki.freepascal.org/IDE_Window:_Watch_list#Viewing.2FExpanding_A rrays  (may need a better description / feel free) QuoteExpanded Arrays are shown paginated. The embedded toolbar lets you change between pages. It also allows to increase the page size. The 2nd value is the size of a page. And it is not limited to multiple of 10, you can enter any number. However, it will cut off at the end of the array => Except when your start point (first number in the control bar) is outside the array bounds. E.g. if you know there is valid memory, then you can view values outside the give bounds. ---------------------------------------------------------------------- han · 2024-03-11 12:12 Quote    Evaluate/Modify window   Perfect useful display of the array information by entering img[1,4..9,6..9]     c) Why not a horizontal scrollbar? QuoteWould a word-wrap checkbox be enough? There are cases where people may want wordwrap. "array [1..99] of string;" (very long strings) Correction. The wordwrap is available for the evalute/modify window. So that is good, no more remarks. For the watches window I noted the horizontal scrollbar is displayed if you make the value column wider and reduce the window  width. So it can be controlled with the width of the value column. So that is also good. Wrapping the watches window would make navigation more difficult. I would keep it as it is. Blue arrow buttons. Personally I more a fan of controlling the watches by the expression. So like string[13...40] or array[0..1,3..5,3..5]. The new blue arrow buttons are not useful for me. Rather confusing.  The unfold buttons with "+" and "-" are good. The behavior of the evalute/modifiy window for arrays suits me better. Note that the string st[13..200] is displayed shorter that is should be. A bug? See screenshot. QuoteAnd if the array is defined as [0..height,0..width, 0..1] ? Then it would probably be better as it is now? Such a structure would make the program slow. The largest dimension is best placed as last in the array. So array[0..2,0..height,0..width] is optimum for speed if width is the largest dimension. ---------------------------------------------------------------------- Zvoni · 2024-03-11 12:29 getting back to the Displaying of records (that thing with [ + ]): Are "linked lists" accounted for? think (Pseudocode) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TMyRecord = Record    SomeInt: Integer;    NextRec:TMyRecord; //Or Pointer to MyRecord, whatever. You get the driftEnd; Beware, you could get into a deeply nested structure, depending how those values are retrieved, and/or if you cut off at the current element Nevermind a cyclic Reference (4th element pointing back to the first one --> endless loop) OTOH, what about? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TMyRecord = Record    SomeInt: Integer;    NextRec:TMyOtherRecord; End; Would there be a [ + ] for "NextRec"? ---------------------------------------------------------------------- Martin_fr · 2024-03-11 12:51 Quote from: han on March 11, 2024, 01:12:10 pmQuote    Evaluate/Modify window   Perfect useful display of the array information by entering img[1,4..9,6..9]     c) Why not a horizontal scrollbar? QuoteWould a word-wrap checkbox be enough? There are cases where people may want wordwrap. "array [1..99] of string;" (very long strings) Correction. The wordwrap is available for the evalute/modify window. So that is good, no more remarks. I meant an option to switch the word wrap off, and instead display the eval/mod window with a horizontal scrollbar.  If you have long Lines, and compare each line to the one above/below (so word wrap would be in the way) QuoteFor the watches window I noted the horizontal scrollbar is displayed if you make the value column wider and reduce the window  width. So it can be controlled with the width of the value column. So that is also good. Wrapping the watches window would make navigation more difficult. I would keep it as it is. Ok. Btw, Column width should be remembered. But if you use Anchordocking that is broken, and you have to set them after restarting the IDE. Bug in Anchordocking. (iirc reported) QuoteBlue arrow buttons. Personally I more a fan of controlling the watches by the expression. So like string[13...40] or array[0..1,3..5,3..5]. The new blue arrow buttons are not useful for me. Rather confusing.  The unfold buttons with "+" and "-" are good. The behavior of the evalute/modifiy window for arrays suits me better. Both options exist. A lot of time arrays are watched that have large amount of entries. In that case pagination is a nice feature. So setting the first page, and page size have use. (The ability to go outside the range is a (imho nice) by-product. But it could be hidden (maybe by option), if the array has less than a certain number of entries. (I don't think it ever makes sense to unfold several thousand rows) QuoteNote that the string st[13..200] is displayed shorter that is should be. A bug? See screenshot. [13..200] means starting at index 13, and going to index 200 (inclusive). So in that case 188 chars, starting at 13. I only have the graph, so counting isn't fun... But it seems to be around that number of chars? If you need the count, both values can be expressions. E.g. if you have variables Start and Count, you can do MyArray[start..start+count-1] (the .. has the lowest precedence, so expressions on both sides will be calculated first) QuoteQuoteAnd if the array is defined as [0..height,0..width, 0..1] ? Then it would probably be better as it is now? Such a structure would make the program slow. The largest dimension is best placed as last in the array. So array[0..2,0..height,0..width] is optimum for speed if width is the largest dimension. But writing a debugger can't assume that the user always choses the most optimal path. Besides for some people readability (as dictated by their data) goes over performance. Mind, I can see the usefulness of tweaking display as you described. Just not by dictating one single layout. So some good way of control would be needed. In the image the expanded table "not following the expression" => Any use of coma-separated index (at least combined with ..) is broken (bug). Their is a fix in 45a6759c3d633b346edc21a04539441bd320b7b0 in the git main branch. (not yet in any release, also not yet merged to fixes). This affects the watches and local window, whenever the [ + ] button is used. Workaround: img[0..1][0..2][0..2] ---------------------------------------------------------------------- Martin_fr · 2024-03-11 12:59 Quote from: Zvoni on March 11, 2024, 01:29:38 pmgetting back to the Displaying of records (that thing with [ + ]): Are "linked lists" accounted for? think (Pseudocode) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TMyRecord = Record    SomeInt: Integer;    NextRec:TMyRecord; //Or Pointer to MyRecord, whatever. You get the driftEnd; Beware, you could get into a deeply nested structure, depending how those values are retrieved, and/or if you cut off at the current element Nevermind a cyclic Reference (4th element pointing back to the first one --> endless loop) OTOH, what about? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TMyRecord = Record    SomeInt: Integer;    NextRec:TMyOtherRecord; End; Would there be a [ + ] for "NextRec"? The debugger only fetches to a certain depth (for any type). I have to lookup the exact depth. I have to check if it will abort cycles before that depth (I think at least in some cases it will). But even if not, to do the limit of depth, there is not going to be an endless loop in the debugger. Yet, you can browse the nested list (or any other) to infinite depth. (NextRec has a [ + ], and then the next one has another...) - If you haven't unfolded, the top level may show a depth N. - If you unfold, each entry in the unfolded list will show a depth N from the top of the entry itself (so N+1 from the top). That means as you unfold more depth becomes visible. There currently is *not* a way to say: display the first 100 entries of the linked list. => I have ideas how to do that. Probably an intrinsic.  ":flaten(MyFirstElementInList, 'NameOfFieldToPointToNextEntry')" (of course with recursion safeguards....) "flaten" because it could also be used for certain trees. Currently you will have to click open [ + ] a hundred times... ---------------------------------------------------------------------- Zvoni · 2024-03-11 13:04 Quote from: Martin_fr on March 11, 2024, 01:59:59 pmThe debugger only fetches to a certain depth (for any type). I have to lookup the exact depth. I have to check if it will abort cycles before that depth (I think at least in some cases it will). But even if not, to do the limit of depth, there is not going to be an endless loop in the debugger. Yet, you can browse the nested list (or any other) to infinite depth. (NextRec has a [ + ], and then the next one has another...) - If you haven't unfolded, the top level may show a depth N. - If you unfold, each entry in the unfolded list will show a depth N from the top of the entry itself (so N+1 from the top). That means as you unfold more depth becomes visible. There currently is *not* a way to say: display the first 100 entries of the linked list. => I have ideas how to do that. Probably an intrinsic.  ":flaten(MyFirstElementInList, 'NameOfFieldToPointToNextEntry')" (of course with recursion safeguards....) "flaten" because it could also be used for certain trees. That's what i meant. I have run into something like that in Excel-VBA (where the Watches- Window also has those [ + ] for nested stuff), and depending on the "size" for that nested stuff, theoretically you could run into an "Out-of-Memory"-Scenario. It also depends, if you "fetch" the data "on demand" (User actually clicks on [ + ] to expand), or if you are "preloading" it ---------------------------------------------------------------------- Martin_fr · 2024-03-11 13:31 Quote from: Zvoni on March 11, 2024, 02:04:40 pmThat's what i meant. I have run into something like that in Excel-VBA (where the Watches- Window also has those [ + ] for nested stuff), and depending on the "size" for that nested stuff, theoretically you could run into an "Out-of-Memory"-Scenario. It also depends, if you "fetch" the data "on demand" (User actually clicks on [ + ] to expand), or if you are "preloading" it Only a small depth is pre-loaded (and hence any recursion stops, if not otherwise halted). Ever arrays and strings have configurable limits (it global debugger backend opts). And that is one of the reasons why the expand for arrays, use pagination => only the needed page will be fetched at the next higher detail level. (there is a cache then for a few pages, if you go forth and back) And the [ + ] goes on demand. Mind the [ + ] actually creates entirely new watches (but re-using some of the known data). You can drag and drop a watch from the expanded sub-tree into the main list. And then it is a stand-alone watch. So instead of typing Foo.Bar, you expand Foo, and then drag/drop Bar to the top level list. Btw pre-load. Watches are evaluated, even if the window is closed. This is triggered by the history window. (which you can switch off, but in the options, only in the window (power button), and which returns back to on, after IDE restart). But usually that does not cause any issue (unless you are on a laptop and closed the watches to save battery) ---------------------------------------------------------------------- 440bx · 2024-03-16 21:12 Another thought about the formatting... Currently in the Watches window, when a record is being watched, the address of the record is included in the output - which is very nice for those who are doing low level debugging. It would also be very nice if the address did _not_ include all the leading zeroes.  Those leading zeroes waste space and don't bring anything to the table except making the value of the address harder to read. Visually, this is what I'd like: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i { CURRENT format                                                              } InoutContext $000000000102F448^: (INSTRUCTION: $000000000102FAA8^: (); OPERANDS: $000000000102F788^: (); OPERAND: $000000000102F788^: (); RUNTIME_ADDRESS: 756604737385660416; USER_DATA: POINTER(nil);) InoutContext $102F448^:          (INSTRUCTION: $102FAA8^:          (); OPERANDS: $102F788^:          (); OPERAND: $102F788^:          (); RUNTIME_ADDRESS: 756604737385660416; USER_DATA: POINTER(nil);) { DESIRED format                                                            } InoutContext $102F448^: (INSTRUCTION: $102FAA8^: (); OPERANDS: $102F788^: (); OPERAND: $102F788^: (); RUNTIME_ADDRESS: 756604737385660416; USER_DATA: POINTER(nil);) The second line is there only to show how much space all those zeroes waste. It could be an on/off option, just in case someone likes to see all those zeroes. ---------------------------------------------------------------------- Martin_fr · 2024-03-16 22:23 Quote from: 440bx on March 16, 2024, 10:12:02 pmCurrently in the Watches window, when a record is being watched, the address of the record is included in the output - which is very nice for those who are doing low level debugging. It would also be very nice if the address did _not_ include all the leading zeroes.  Those leading zeroes waste space and don't bring anything to the table except making the value of the address harder to read. That are probably pointer to record, or object-instances. flat nested records should show data IIRC. But that is beside the point. Yes, that would be an option. Currently hex and bin show the full width of the data type => that can be useful to explicit show that those are zero (e.g.:set of enum), or to just know if one looks at a word, dword, or qword. But not to show them can be valid too. Currently, I am racking my brain how to make the watch properties more user friendly. Especially the "all" page. Probably reduce "all" to a smaller set, and have the rest on dedicated pages only (there may be more pages too ...). But also the repeated word "default" conveys too little info... ---------------------------------------------------------------------- 440bx · 2024-03-16 22:58 Quote from: Martin_fr on March 16, 2024, 11:23:03 pmCurrently, I am racking my brain how to make the watch properties more user friendly. Especially the "all" page. Probably reduce "all" to a smaller set, and have the rest on dedicated pages only (there may be more pages too ...). But also the repeated word "default" conveys too little info... I'm using Lazarus v3.2... I didn't see an "all" page... did I miss it or is it a page that is only available in the trunk version ? ---------------------------------------------------------------------- Martin_fr · 2024-03-16 23:17 Quote from: 440bx on March 16, 2024, 11:58:06 pmI'm using Lazarus v3.2... I didn't see an "all" page... did I miss it or is it a page that is only available in the trunk version ? Trunk only. (lots of new switches for the display format) ---------------------------------------------------------------------- 440bx · 2024-03-17 15:15 I updated one of the Lazarus trunk installations I had. At this time and, as far as formatting goes, I'd like the formatting of the right hand pane (which opens with a little button on the toolbar)  to match the formatting of the left hand pane. Currently, the formatting is different, it starts like it is on the left hand pane but eventually gets messed up (jumbled, hard to read.) Attached is an example of the formatting mismatch "problem" (notice the different formatting and the jumbled data midway.) Totally unrelated to formatting but, definitely important.  the little button that opens the right hand pane is right next to the "delete all" button and the "delete all" button doesn't give second chances, you click that button and all your watches are instantly gone.  This can be quite a bummer when watching a number of complex expressions that vanished because of clicking the wrong button.  It would be rather convenient if the "delete all" button prompted the user for "are you sure you want to delete all your watches ? (_no_ undoing that!) Thanks PS: I looked at the "all" page and, I can see it's not easy to streamline all those options.  If I eventually have an idea, I'll share it. ETA: Normally a "delete all" button is an icon that consists of a big _red_ X.   The current "delete all" icon can easily be confused with an "additional details" or whathaveyou icon including opening the right hand pane.  I would be rather pleased to see a big red X icon there instead of the little paintbrush (or whatever that thing is) to annihilate the watches. ---------------------------------------------------------------------- Martin_fr · 2024-03-17 16:06 Quote from: 440bx on March 17, 2024, 04:15:39 pmI updated one of the Lazarus trunk installations I had. At this time and, as far as formatting goes, I'd like the formatting of the right hand pane (which opens with a little button on the toolbar)  to match the formatting of the left hand pane. Currently, the formatting is different, it starts like it is on the left hand pane but eventually gets messed up (jumbled, hard to read.) That pane has been there for many versions.... It actually pre-dates the ability of expanding watches. So when a TForm watch was a single line, and you couldn't see any fields => that was a solution. Now, it still can make a difference for a small(er) set of watches, where subtle formatting differences are helpful. (and for mem dumps, until they can expand too). From a precursory look the "jumbling" happens due to word wrap. Only the outer structure has a new line for each field. The nested structure form a long long line (and wraps). Depending on the use-case I can see 2 options. - Allow to disable word wrap (and have a horizontal scrollbar) - Insert new lines (and then indent) for nested structures (up to some level of nesting...). That does space out the outer structure. E.g. the latter is less preferable, if you have Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MyData: record a,b,c,d,e: TPoint; end;The TPoint will look a lot better if they are one line each. At the moment this memo is not custom painted, that is the formatting of the text is not affected by the size of the memo. The formatter isn't told, there are N chars per line (and I am not sure, the font may not even be monospaced). Though (the option of) a monospaced font, could allow for aligned formatting. (but that would probably only happen if/when wordwrap is off / when there is a horizontal scrollbar) QuoteTotally unrelated to formatting but, definitely important.  the little button that opens the right hand pane is right next to the "delete all" button and the "delete all" button doesn't give second chances, you click that button and all your watches are instantly gone.  This can be quite a bummer when watching a number of complex expressions that vanished because of clicking the wrong button.  It would be rather convenient if the "delete all" button prompted the user for "are you sure you want to delete all your watches ? (_no_ undoing that!) +1 QuoteNormally a "delete all" button is an icon that consists of a big _red_ X.   The current "delete all" icon can easily be confused with an "additional details" or whathaveyou icon including opening the right hand pane.  I would be rather pleased to see a big red X icon there instead of the little paintbrush (or whatever that thing is) to annihilate the watches. The brush is used in various places.... But still, noted. ---------------------------------------------------------------------- VisualLab · 2024-03-18 17:14 Quote from: Martin_fr on March 17, 2024, 05:06:37 pmQuoteNormally a "delete all" button is an icon that consists of a big _red_ X.   The current "delete all" icon can easily be confused with an "additional details" or whathaveyou icon including opening the right hand pane.  I would be rather pleased to see a big red X icon there instead of the little paintbrush (or whatever that thing is) to annihilate the watches. The brush is used in various places.... But still, noted. I am also in favor of changing the icon (glyph) from a brush (broom?) to a large red X. It is much more readable. ---------------------------------------------------------------------- Martin_fr · 2024-03-18 18:36 Generally, I am in favour of changing the icon. However, a single X usually kills one item. For a list, there could be several X (the search result window has some stuff build on that, but very specialized). There could be a brush/X combination.... Or like the "Close all" has pages with an X, the debug windows could hove some "item list" with an X. Or, well, maybe check what else is used throughout the IDE. Before inventing something new... ---------------------------------------------------------------------- Martin_fr · 2024-03-20 18:48 The "delete all" icon has been changed. A confirm dialog was added. Both in 3.99 ---------------------------------------------------------------------- 440bx · 2024-03-20 20:54 Quote from: Martin_fr on March 20, 2024, 07:48:24 pmThe "delete all" icon has been changed. A confirm dialog was added. Both in 3.99 That's great... thank you   will have a look at the new trunk soon. ---------------------------------------------------------------------- Martin_fr · 2024-03-21 22:58 Quote from: Martin_fr on March 16, 2024, 11:23:03 pmCurrently, I am racking my brain how to make the watch properties more user friendly. Especially the "all" page. Probably reduce "all" to a smaller set, and have the rest on dedicated pages only (there may be more pages too ...). I am thinking more and more about dropdowns. Then instead of many radios, each option would have a label and a dropdown. The advantage of radios is (was) that its one-click. But with so many of them, that advantage is gone anyway, or isn't it? ---------------------------------------------------------------------- 440bx · 2024-03-21 23:06 Quote from: Martin_fr on March 21, 2024, 11:58:06 pmThe advantage of radios is (was) that its one-click. But with so many of them, that advantage is gone anyway, or isn't it? There is another advantage that I am quite fond of, which is, with the radio buttons the programmer gets to see all the available options without having to go through one drop down after another.  IOW, no "option-hunting" necessary. Personally, in spite of the many radio buttons currently on the pages, I prefer that over drop downs.  Of course, other programmers may feel differently and probably should make their preference known here (whichever way they prefer.) ---------------------------------------------------------------------- Martin_fr · 2024-03-22 10:05 Quote from: 440bx on March 22, 2024, 12:06:47 amQuote from: Martin_fr on March 21, 2024, 11:58:06 pmThe advantage of radios is (was) that its one-click. But with so many of them, that advantage is gone anyway, or isn't it? There is another advantage that I am quite fond of, which is, with the radio buttons the programmer gets to see all the available options without having to go through one drop down after another.  IOW, no "option-hunting" necessary. Personally, in spite of the many radio buttons currently on the pages, I prefer that over drop downs.  Of course, other programmers may feel differently and probably should make their preference known here (whichever way they prefer.) Yes. I might go for - all radio on the individual pages (only one page selected, not "all")   though maybe some very few of the options would still get "hidden" in combo-boxes.   E.g., the option to display on object as "address only" (which only will be of interest if you show an array of objects, and only want to compare the addresses). - On the "All" page (or multi selections of pages) drop downs could be used (or again a mix of them). About mixing... I wonder, some radios, and then a last radio wich activates a dropdown? Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Base:   [O] Default    [O] Decimal   [O] Hex    [O] [[Dropdown]]   Then there are options with 3 states (default/on/off), like "Sign" = default / signed / unsigned (Maybe ..., even options that are (default/on/off/only)) They could always be comboboxes? Advantage, with the current layout of 4 columns, you can fit 2 such options into one row (each have a label and a drop-down). For "Sign" default" is important, because it follows the type of the variable. Which also means, if a user sets there global defaults for that, they currently can't go back to "automatic" in the watch-properties. It could be a checkbox, with greyed state. But.... the "all" page already shows several values, and greyed therefore would be used for that (and also, eventually it should be able to edit several watches at once. ---------------------------------------------------------------------- 440bx · 2024-03-22 19:25 Here are a few thoughts... I like the "Current" because that is what applies to the expression being watched.   Usually, the other "stuff" isn't of interest (at least not immediate interest.) Refer to the attachment for the following comments to make sense... I don't think that the "Default" radio items are necessary.  I think that the default option should simply be selected, e.g, in the case of "Default (Deref)", I'd get rid of the "Default (Deref)" altogether and simply have the default state selected "Off"/"On"/"Only" (whichever applies.)  Aside from getting rid of clutter, it shows what the default option is.  Currently, it is unclear whether Default (Deref) means "Off", "On" or "Only". On that note and, I could be wrong but, it seems to me that as far as "Address format" the default isn't "Typed" as the label suggest.  Playing with the thing left me with the impression that the default is "Address" not "Typed address".   Therefore if the label "Default (Typed)" was not there, there could not be any source of errors or user confusion. At this stage, my suggestion is: get rid of the "Default" labels, I find they muddy the waters instead of making things clearer. the second line (below Address format) is about the _value_ at the address and that's not clear.  I'd add a heading along the lines of "value at address" and make the Signed/Unsigned options appear only when "Decimal" is selected (I don't think those option make sense for the other options.) There... my $0.02  hopefully, there is something useful in there for you. Another thought... As far as the non-current stuff... I'd be inclined to put that in a different window altogether where global defaults are selected.  IOW, I wouldn't have any options that are not applicable to whatever expression is being watched, e.g, if what's watched isn't a boolean variable then no "boolean" option anywhere in the window. In the case of selecting formatting for record fields then, I would expect the user to double click on the specific record field and select whatever is available from the options that apply to the field's type. As previously mentioned, the defaults for built-in types should be selected in a global settings window... something along the lines of... Tools->Options->Debugger->Display Format (but without the Default Labels) and instead of the default labels, on that window, I'd have the "number", "enum", "boolean", etc arranged vertically in the space currently used by the "Default" labels. The more I think about it, the more I think that getting rid of the "Default" labels would make things clearer and eliminate clutter. now... back to porting some C code... ETA: Added the forgotten attachment. ---------------------------------------------------------------------- Martin_fr · 2024-03-22 21:12 Quote from: 440bx on March 22, 2024, 08:25:18 pmI like the "Current" because that is what applies to the expression being watched.   Usually, the other "stuff" isn't of interest (at least not immediate interest.) But, "current" can only be selected once the data has been evaluated. Click "add new" and the IDE has no idea what your expression will return. Then it defaults to "all".... That is the main reason for "all". Also if you watch a structure, then fields inside can have numbers, enums,..... => and then those others can be of interest. And then you can multi-select  (hold shift and click more than one tab). So you can change enums and bool in one go. (Ok, that is not important, but doesn't harm) QuoteI don't think that the "Default" radio items are necessary.  I think that the default option should simply be selected, e.g, in the case of "Default (Deref)", I'd get rid of the "Default (Deref)" altogether and simply have the default state selected "Off"/"On"/"Only" (whichever applies.)  Aside from getting rid of clutter, it shows what the default option is.  Currently, it is unclear whether Default (Deref) means "Off", "On" or "Only". This actually depends on the option. Default for "signed" is important. Because it isn't just signed or unsigned. The meaning of default changes, depending on the type of the data. ("Step into" and "i" may no longer be qword but int64 instead). If the user explicitly set it to "unsigned" then the int64 will be converted. If it would be set to unsigned, due to the global default, then once it is set, it is set => same checkbox. No difference to having been set by user. Mind, that I have the IDE of allowing different defaults, depending on the typename. So if the debugger says  this is TMyNumber then that could changed the meaning of "default" to something different than it has for integer. And that will get very complicated, if the default simple gets copied onto the current settings. The same problem applies in the evaluate window. Here the expression is changed often. If the global setting were copied, then they must get copied each time the expression changes. But that would mean the user couldn't select a value that anymore and have it stick. I do agree that for some settings (such as "deref") the "default" is irritating at first (especially because few will actually have there own default, and fewer several defaults). One way would be to only show it (for those kind of options), if the default is something that can change. Off course in that case, if you add the config for this, then all existing watches will be set explicitly to "not default" (but that may be very very minor). --- About default not indicating what it is.... As I said, for signed it can't actually do that (or only if it has evaluated data, and then only for the current data, and that may then be misleading, because with the next "step into" the meaning of default can change). The number-base had the same issue, but no longer has it. Originally pointers used that too, and pointers defaulted to hex, other numbers to decimal. But, then as I said, the plan is, that the user can specify different defaults for different types (by typename). And then all "defaults" potentially don't know what they are. But even now, where the user can only set one global default => The user can change that. And all watches an "default" will follow. --- Though maybe there only needs to be one default for "base and sign". If the user selects a base they also must decide the sign. (and other future properties, such as lead zeros) On the other hand (to make matters worse), for the "signed-ness" of numbers: If Default means to follow the global settings, and if the global settings are either "signed" or "unsigned", then how to force it bace to automatic. Also in the global options, this should probably read "Automatic" rather than "Default". However in the Project options, it is "default", since if the project options leave it on "default" then it follows the IDE global options. https://en.wikipedia.org/wiki/The_Sorcerer%27s_Apprentice "The spirits that I summoned" QuoteOn that note and, I could be wrong but, it seems to me that as far as "Address format" the default isn't "Typed" as the label suggest.  Playing with the thing left me with the impression that the default is "Address" not "Typed address".   Therefore if the label "Default (Typed)" was not there, there could not be any source of errors or user confusion. Ah, ok that needs to be improved. The "(Typed)" means "(Typed-ness of the address)" which can then be set to any of the options.  (Like the "Default(Sign)" for numbers). It's the Category for which "default" is selected. Not the meaning of default. QuoteAt this stage, my suggestion is: get rid of the "Default" labels, I find they muddy the waters instead of making things clearer. They need at least to be different. I thought about a checkbox at the start of each line. If it is not set, then no settings have been made. (Like in the color editor in the options. The checkbox in front of "foreground" needs to be set, for the color to be chosen) It could be set automatically as soon as a radio is picked. And if it is unchecked then all radios are cleared. It be the same amount of clicks to do anything. Only the checkbox works reverse. - unchecked = default - checked = specific value selected by radio ---- Then I wonder, if it makes sense to introduce each group with a label. - Base - Sign - Show Char - Enum ? .... But many are so obvious.... ----- Also something like    [O] Default   [O] Address    [O] Typed Address could be a checkbox [X] Show address with typecast And, if a default (aka, follow global options) is needed [X] Override Global  [X] Show address with typecast I'd like to have the "override global" to be a single column, with ideally no text.... But there is no way to make that self explaining. (It would need some header, and some indicator, that it is a special column...) Improved naming => always welcome. Quotethe second line (below Address format) is about the _value_ at the address and that's not clear.  "numeric representation" may be a better word And really, its just because people can store any data in "Items.Object" and stuff like that. Yes, users can typecast. But not if they look at entries from the history list (currently they can't change the display format for that either, but that should eventually work) QuoteI'd add a heading along the lines of "value at address" and make the Signed/Unsigned options appear only when "Decimal" is selected (I don't think those option make sense for the other options.) If I change "Address format" into "Number format for Address". That together with above change to the "typed" option. Better? QuoteThere... my $0.02  hopefully, there is something useful in there for you. Any feedback is always useful. I only have one head, only one mindset. That is a limiting factor ;) (really whatever evolution has thought about that, probably evolution didn't ask for feedback ;) ) QuoteAs far as the non-current stuff... I'd be inclined to put that in a different window altogether where global defaults are selected.  IOW, I wouldn't have any options that are not applicable to whatever expression is being watched, e.g, if what's watched isn't a boolean variable then no "boolean" option anywhere in the window. As, explained Add new watch => no info on the result type yet QuoteIn the case of selecting formatting for record fields then, I would expect the user to double click on the specific record field and select whatever is available from the options that apply to the field's type. Once it is expanded, then yes that is (will eventually be) an option. In the Evaluate/Modify window it is not. And also, the idea is, to have a toggle between "most outer value" and "values that are nested" => the structure "only address" currently makes almost no sense. But if you watch an array of TButton, then you may want the address of each button only. That allows you to see, if 2 entries refer to the same object. So that may be limited to the global options.... QuoteAs previously mentioned, the defaults for built-in types should be selected in a global settings window... something along the lines of... Tools->Options->Debugger->Display Format (but without the Default Labels) and instead of the default labels, on that window, I'd have the "number", "enum", "boolean", etc arranged vertically in the space currently used by the "Default" labels. They are already there. (yes the default labels, need to be replaced there. (See also above, and reference to the same settings in the project options) ---------------------------------------------------------------------- 440bx · 2024-03-22 21:49 Quote from: Martin_fr on March 22, 2024, 10:12:36 pmQuoteI'd add a heading along the lines of "value at address" and make the Signed/Unsigned options appear only when "Decimal" is selected (I don't think those option make sense for the other options.) If I change "Address format" into "Number format for Address". That together with above change to the "typed" option. Better? Not sure... I wasn't referring to the Address... I was referring to the format of the number found at Address.  Having a label that reads "for Address" gives (at least to me) the impression that what is is being modified is the format of Address instead of the format of the number located at that address. Quote from: Martin_fr on March 22, 2024, 10:12:36 pmAs, explained Add new watch => no info on the result type yet Now I realize that I inadvertently focused on specifying characteristics of an already existing expression (I was debugging using my existing expressions.)  When it's a new expression, it's a different story.  Gotta keep that in mind. I'll post more/other ideas when I have them ---------------------------------------------------------------------- Martin_fr · 2024-03-22 22:46 Quote from: 440bx on March 22, 2024, 10:49:48 pmQuote from: Martin_fr on March 22, 2024, 10:12:36 pmQuoteI'd add a heading along the lines of "value at address" and make the Signed/Unsigned options appear only when "Decimal" is selected (I don't think those option make sense for the other options.) If I change "Address format" into "Number format for Address". That together with above change to the "typed" option. Better? Not sure... I wasn't referring to the Address... I was referring to the format of the number found at Address.  Having a label that reads "for Address" gives (at least to me) the impression that what is is being modified is the format of Address instead of the format of the number located at that address. On the Structure tab, the settings in the red box, apply to the pointer itself. That is, if you enable the green section, then an object (TObject, that has an internal pointer) will show as Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $0000000021EC76F0: TAutoSizeBox(Control: nil; MinimumSize: (290, 0); ..........Or just the address for "only". Since we have an address column, this really is mainly for nested values. Anyway in that case, this pointer can be shown in formats other than hex. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   L := TStringList.Create;  L.AddObject('1', TObject(1));  L.AddObject('2', TObject(2)); And the watch: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i L.FList^[0..1].FObject There isn't even an TObject to be shown from address $0001 But then maybe you added -739 as number. You might want to see it as such. ---------- there seems to be a bug: on/off are switched. ---------------------------------------------------------------------- Martin_fr · 2024-03-24 21:56 So I done a mockup. The checkbox at the start means: Value is user-specified. - So if it is not set, then global defaults are used. - If a radio is clicked, then it will be set automatically Not sure: - if it needs a label. - if the label should be first (to the left of the box) In the 2nd row, the checkboxes must be moved right, to be associated with the next dropdown. And on that line, The may not need a label at all. (ok "Auto" would then need to read "Auto (Sign)" or "Sign as typed" "Leading Zero" would be to have full 16 hex digits for a 64bit number. "Extra" (better name) would allow a 2nd format for the numeric name (so it have dec, hex, bin, oct, char // mabye "dec, signed dec, unsinged dec,") In the first row, the dropdown would currently have "oct", "char" (pointer would be removed, makes no sense, it is just unsigned hex) Ignore the 2nd / old number block. Shouldn't be there. For the other formats, it then needs to be decided what goes into dropdowns. - If it is still to much (on the "all" page), as last resort "enum" and "float" could be on one line (with separator), then they would have dropdowns too. If "current" or a single page is selected, dropdown (at least some/most) could expand into radios. ----- Thoughts? ---------------------------------------------------------------------- Martin_fr · 2024-03-24 21:58 The checkbox could move onto the divider line... Of course, it still needs alignment... Just a mockup. But it actually would free up the space of the "default" (well the first "default" in each section / but many only have one) So with or without any of the other ideas, that seems to be useful. And as far as intuitive / self explaining goes: "default" wasn't either. And a hint can be added. --- EDIT: There are a couple of options, when it's moved to the header. 1) As described, it means "Radios override global pre-set" 2) The other way: "Use global pre-set" (and then, if there is space, display the value of the pre-set in the header) It could also be a radio-button in the header. Though that depends.... Currently (on the number example), there are still "default selectors" for "Signed-ness" (and for future "leading zeros"). Though, it is questionable if they do need there own "default/override". If the user overrides the base (e.g. selects binary), then it can be imposed that they should make a choice for those 2 too. Pointer/Structure may then need more (or different) sub-divides. (To have good sets of what gets overridden together). If however, the global default covers more than one radiogroup (base + sign + lead), then it would be weird, if it was a radio button (because it belongs to non-of the groups, but affects them all. --- EDIT 2: Alternative mockup image.... Radios: I don't like the radios in the caption... They could go to the front (but the current defaults would need to stay at the end, and that would be awkward too, imho) Checkbox: The natural default- as they relate to the settings below them - is that they enable those settings. Aka "Override the global settings, with the selection made on this form". But, if the current global settings are shown in the header, then that may not be the expected behaviour any more.... Maybe a question of naming/wording. ---------------------------------------------------------------------- 440bx · 2024-03-26 00:11 Hi Martin, You got me racking my brain thinking about how I would do it.  Not easy... What I see as the main problem, which generates downstream problems is how to handle a click on the watches window "+" sign. I see that as the main problem because when the user clicks the "+", the debugger has no information whatsoever about the type of the expression which means that it's not possible to show only the options that apply to a specific type because the type isn't known. As a result of that, I'm thinking that the "expression" box should have a little "->" (arrow) that means "I'm done with the expression" (the arrow could be clicked using the mouse or "clicked" by simply pressing /.)   At that point the debugger would know the type of the expression (presuming the expression is valid) and can show options that apply to that type of expression.  Limiting the options to only those that apply I think can simplify things. The downside of that method is that using the "+" is now a 2-step process. First step: tell the debugger what the expression is.  Second step: select the appropriate formatting options for the type. This method would also mean that if the user changes the type of the expression (by typecasting or changing an existing expression) then the user would be required to press return or click the little arrow to let the debugger know the expression has changed therefore the options may need to be changed to reflect the new expression type (if the change caused a change in type.) What I'm really saying is that the problem I currently see is trying to have all the options for all types available at all times regardless of the expression's type.  I think that complicates organizing the options. There are really only a few "root types" from which other types are derived. I think that if somehow the options are limited to those which apply to a given root type then there is a reasonable chance of ending with something nice and reasonably straightforward. I am unable to see a good solution that gives all possible options regardless of the expression type.  Plus, in that case, there are options that don't make sense.  For instance, in v3.2 it is possible to select "Record/Structure" for a qword variable, ideally, I think that option (record/structure) shouldn't be there for that type (qword.) The more I think about it, the more I believe that trying to make all options available regardless of type is what causes a lot of the problems in organizing the options. My $0.02... ---------------------------------------------------------------------- Martin_fr · 2024-03-26 09:36 Quote from: 440bx on March 26, 2024, 01:11:22 amAs a result of that, I'm thinking that the "expression" box should have a little "->" (arrow) that means "I'm done with the expression" (the arrow could be clicked using the mouse or "clicked" by simply pressing /.)   At that point the debugger would know the type of the expression (presuming the expression is valid) and can show options that apply to that type of expression.  Limiting the options to only those that apply I think can simplify things. It's possible to add watches before pressing run, and then the arrow wouldn't work. Also, if it is 2 click, in most cases the user knows what the type will be. So the user can then chose the correct tab for the displayformat. Then it is just about condensing "all" to a selection of the most common of each type (so it wouldn't be "all" anymore. I don't currently see how to completely avoid the "all" page. Other than removing it, and display one of the others as default (e.g. number), and the user has to switch, if they need "enum" or something else. (Auto detection could be added, but won't solve it because it is not always available) Generally the idea of "evaluate while the properties are still open" is interesting. E.g. there could be a preview. The result and it's format depend on a lot of options now. So having a preview would be nice. It may have to take the selected backend into account though. E.g. with FpDebug it is so fast, that if you make a change, it can just eval it on each keypress (and fpdebug is stable enough for that). If the IDE sends the (partial) expression to gdb on each keystroke, then it will end up having a queue, because the user types faster than gdb delivers. And on top, gdb may crash on the partial expression. Of course, it could be on EditingDone. and then when changing other settings in the watch properties. But that is a new topic. QuotePlus, in that case, there are options that don't make sense.  For instance, in v3.2 it is possible to select "Record/Structure" for a qword variable, ideally, I think that option (record/structure) shouldn't be there for that type (qword.) Yes well, the old were quite limited... The new, well let's see. First step I am doing now, is moving the default into the headers. - A few radio less - Better distinction between "inherit global" and "actual selection" - fix, that they should be hidden in Tools > Options Then I will likely select what remains on the "all" page. Or use dropdowns, but only on the "all" page, keeping radios on the individual pages. ---------------------------------------------------------------------- Martin_fr · 2024-03-26 11:18 You were right. Removing (or as I ended up doing, just "moving") the "default" radios, does help. It makes it a lot less overwhelming. In the images there are still some left, that I am still working on.... (also some labels/text need to be updated...) It hasn't yet reduced the overall space, but its a step away from "way too much". I am not yet sure, if the sections should be indented. I also tried to align the first radio column, below the checkbox, but found it irritation (distinction between header and section becomes reduced). I think, if a setting like "address: on/off/only" became a dropdown, and moved to the empty space in the line above => that would further help. But will have to try and see. (On the "structure" only tab, it would stay radiobuttons) I also want to play with low-lighting the radios in groups that aren't activated (that default to global settings...) ---------------------------------------------------------------------- 440bx · 2024-03-26 20:57 Quote from: Martin_fr on March 26, 2024, 12:18:45 pmI am not yet sure, if the sections should be indented. I think some indent would be nice.  Personally, I'd try making the first radio button be flush with the left side of the label above it.  I think that's worth a try, see how it looks. I think there is a noticeable improvement in the form of less clutter than the original. Now, on a different note... FPC, like C, considers pointers to be arrays.  Basically, a pointer to "something" is, potentially, an array of that "something".  I think that when a pointer to something (i.e, a typed pointer) is entered in the expression box _and_ the "repeat count" is greater than zero then "repeat count" elements should be shown (just like an array.) In addition to being consistent with FPC's treatment of pointers as array, it would also be very convenient when there is a pointer to an array of pointers to something.  Refer to the attached screenshots.  In the screenshot, the variable (pointer) _GlobalData.gd_instructions_offsets is an array of pointers to a record structure. The watches windows only shows the first element in spite of the fact that the "repeat count" for that variable has been set to 5 (some reasonable number greater than zero) to see more elements they have to be manually added as shown in _GlobalData.gd_instructions_offsets[1] and _GlobalData.gd_instructions_offsets[2].  Ideally, once the repeat count has been set to a value greater than zero then a set of "bound selection values and arrows" would appear under that pointer name (now considered/seen as an array because the repeat count is greater than zero.) like those shown under the ii_instruction_prefixes (which happens to be a "real" array.) Lastly and, this might just be a bug, notice how the formatting of the right hand side is different for the two screenshots even though it's displaying the same element type.  It looks like, for some reason, it considers them different. Thank you for your patience and all the hard work you put into FpDebug. I've forgotten to mention this and I don't want to forget it again.  Enabling FpDebug to correctly handle DebugBreak() was truly a make it or break it feature for me.  I have a lot of code with "IsDebuggerPresent()" that executes an "int 3" (which is still unwelcome) but, now I can replace the "int 3"s with DebugBreak() and have my code "debug ready" at any time. before that, I was forced to use GDB because all my debugging code would cause an exception.  Succinctly, FpDebug's honoring DebugBreak() is a life saver.  Also, now that I can use FpDebug, I find it much more pleasurable to use than GDB.  Thank you! ---------------------------------------------------------------------- Martin_fr · 2024-03-26 21:52 Quote from: 440bx on March 26, 2024, 09:57:51 pmFPC, like C, considers pointers to be arrays.  Basically, a pointer to "something" is, potentially, an array of that "something".  I think that when a pointer to something (i.e, a typed pointer) is entered in the expression box _and_ the "repeat count" is greater than zero then "repeat count" elements should be shown (just like an array.) Agreed.... Though... It may be different per backend.... And... Currently the gdb backend can do a repeat count on "ptr[1]" => because then it has an index, and it knows what to increase. (FpDebug does not (yet?)) And that is one way to interpret "repeat count". But then it becomes ambiguous if "ptr[1]" itself is a typed pointer, and if typed pointer can also act on the repeat count. So should "repeat count" act on the index (iirc last/deepest index)? Or on Pointers.  Index has the advantage, that  you can specify a start point. If implemented as in gdb, then you would need a watch "Ptr[0]" to have "repeat count" working. Mind that FpDebug can handle a typed pointer the same way like an array. And that means, independent on which way the "repeat count" will act, you can do  Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   MyTypedPtr[5..14] to get elements 5 to 14. QuoteIn addition to being consistent with FPC's treatment of pointers as array, it would also be very convenient when there is a pointer to an array of pointers to something.  Refer to the attached screenshots.  In the screenshot, the variable (pointer) _GlobalData.gd_instructions_offsets is an array of pointers to a record structure. The watches windows only shows the first element in spite of the fact that the "repeat count" for that variable has been set to 5 (some reasonable number greater than zero) to see more elements they have to be manually added as shown in _GlobalData.gd_instructions_offsets[1] and _GlobalData.gd_instructions_offsets[2].  Ideally, once the repeat count has been set to a value greater than zero then a set of "bound selection values and arrows" would appear under that pointer name (now considered/seen as an array because the repeat count is greater than zero.) like those shown under the ii_instruction_prefixes (which happens to be a "real" array.) At the moment you can watch Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData.gd_instructions_offsets[0..5]or Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData.gd_instructions_offsets[0..5]^or Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData.gd_instructions_offsets[0..5]^.IILINSTRUCTION_OPCODE_LEN The last one, if you only want to see the particular field of each record. The ".." returns an array. And you can have more than one Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData .gd_instructions_offsets[0..5]^.IILINSTRUCTION_OPCODE[1..3]if you want that subset of opcodes for each record. And each of the index numbers can be an expression. QuoteLastly and, this might just be a bug, notice how the formatting of the right hand side is different for the two screenshots even though it's displaying the same element type.  It looks like, for some reason, it considers them different. In this case its an unnecessary difference. The general issue was mentioned by someone else in this thread. Currently the outermost element is formatted multi-line. All nested elements are single line. That rule makes senes in case of "array of TPoint". The points do well if they are single lined. In that case better than if they were multiline. Same for a "record a,b,c,d,e,f,g: TPoint" But, if the nested structure is bigger, then its a case by case decision. It may be better to multi-line the inner struct too, and give it an appropriate indent. In your case the outermost value is the pointer to pointer. Without having checked the code, from the display it appears to me, that a single pointer as outermost value is ignored. But a pointer to pointer is an outermost value that consumes the multiline, and displays the rest single line. Yes, that could/should be seen as a bug. QuoteI've forgotten to mention this and I don't want to forget it again.  Enabling FpDebug to correctly handle DebugBreak() was truly a make it or break it feature for me.  I have a lot of code with "IsDebuggerPresent()" that executes an "int 3" (which is still unwelcome) but, now I can replace the "int 3"s with DebugBreak() and have my code "debug ready" at any time. before that, I was forced to use GDB because all my debugging code would cause an exception.  Succinctly, FpDebug's honoring DebugBreak() is a life saver.  Also, now that I can use FpDebug, I find it much more pleasurable to use than GDB.  Thank you! "int 3" or "int3" ? with or without space? They may act different. If FpDebug with the feature enable handles only one (the one that compiles to $CC) then you can add a bug, as feature request to treat int3 and "int 3" both. ---------------------------------------------------------------------- Martin_fr · 2024-03-26 21:58 Btw, on the first image in your previous post, the value in the inspect pane Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PPInstruction($1234)^^: $2345^: (...) The 2nd address of the intermediate pointer - good feature - acceptable / endurable - bollocks ? ---------------------------------------------------------------------- 440bx · 2024-03-26 23:07 Quote from: Martin_fr on March 26, 2024, 10:52:22 pmCode: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   MyTypedPtr[5..14] to get elements 5 to 14. At the moment you can watch Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData.gd_instructions_offsets[0..5]That's perfect!... that does the trick... that's as good as it can get. Quote from: Martin_fr on March 26, 2024, 10:52:22 pmCode: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i _GlobalData.gd_instructions_offsets[0..5]^.IILINSTRUCTION_OPCODE_LEN The last one, if you only want to see the particular field of each record. That's great... I wouldn't even have dared ask for that one. Quote from: Martin_fr on March 26, 2024, 10:52:22 pmYes, that could/should be seen as a bug. is your being aware of the bug sufficient or would you like me to file a bug report for it ? Quote from: Martin_fr on March 26, 2024, 10:52:22 pm"int 3" or "int3" ? with or without space? They may act different. I always use "int 3" (with the space) I haven't tried "int3" (until now) Quote from: Martin_fr on March 26, 2024, 10:52:22 pmIf FpDebug with the feature enable handles only one (the one that compiles to $CC) then you can add a bug, as feature request to treat int3 and "int 3" both. Yes, FpDebug treats them differently.  "int3" (one word) is fine but "int 3" (separately, i.e, CD 03) isn't, causes an access violation exception.  In the attachment, the first int3 goes fine, the second "int 3" doesn't. I'll log a feature request to have "int 3" (with space) be treated the same as "int3" (without space.)  This is really getting better and better ETA: added the forgotten attachment ---------------------------------------------------------------------- 440bx · 2024-03-26 23:11 Quote from: Martin_fr on March 26, 2024, 10:58:29 pmBtw, on the first image in your previous post, the value in the inspect pane Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PPInstruction($1234)^^: $2345^: (...) The 2nd address of the intermediate pointer - good feature - acceptable / endurable - bollocks ? It would be a good feature because that allows the user to verify the pointer is pointing into the expected block of memory and not some random block that happens to yield reasonable values. ---------------------------------------------------------------------- 440bx · 2024-03-27 00:14 The following has nothing to do with formatting per se but, I find it a very useful feature.  Refer to the screenshots, my editor has a little arrow (the one pointing left) on the right hand side of the "Search for:" box.  When that arrow is clicked, a number of common and useful regular expression identifiers appear.  I find this extremely nice because in most cases I don't need a regular expression which means that when I need it, I rarely remember what character does what.  Having that little window (really a popup menu) with the most common options is a quite useful reminder when I need a regular expression. In the case of FpDebug, I think that  having a button that doesn't even need to be clicked, just hovered upon, to present some "formatting trick" reminders would be useful. For instance the trick about "@textvar[0]" to not have every character individually enclosed in single quotes is quite useful (not something I'm going to forget anytime soon either) and, the trick you just mentioned "Someptr[0..n]" where "n" is some value to create an array is great and I think should definitely be included in a little "reminder/cheat sheet" like that. What I've realized is that, it's obvious you know formatting "tricks" that most users won't think about (like the ptr[0..5] for instance) that would be rather welcome in such a quick cheat sheet. Of course, as previously mentioned, this isn't really about formatting, it's really a feature request: a little cheat sheet window with useful formatting tricks.  Also, initially it would only have a few, non-obvious, tricks which could be added on as new ones are thought of.  IOW, initially having just 3 or 4 tricks (or even less) in the little window would be fine. ---------------------------------------------------------------------- Martin_fr · 2024-03-27 11:38 Quote from: 440bx on March 27, 2024, 12:07:34 amQuote from: Martin_fr on March 26, 2024, 10:52:22 pmYes, that could/should be seen as a bug. is your being aware of the bug sufficient or would you like me to file a bug report for it ? Added to the list of items in this thread (in my original opening post). Also, you were the one who pointed out that nested values are "jumpled": https://forum.lazarus.freepascal.org/index.php/topic,66143. msg511387.html#msg511387 And internally, this falls in the same category. Quote from: 440bx on March 27, 2024, 12:11:14 amQuote from: Martin_fr on March 26, 2024, 10:58:29 pmCode: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PPInstruction($1234)^^: $2345^: (...)The 2nd address of the intermediate pointer It would be a good feature because that allows the user to verify the pointer is pointing into the expected block of memory and not some random block that happens to yield reasonable values. Ok. In that case 1) the first pointer should have only one "^" 2) How to display in the main watches area when expanding? I mean expand should probably still show the final deref value.... I have thought about allowing to expand pointers (even to non struct/array). E.g. expanding ^double would just show the double number (in the expanded row). A quick way to see it without address (if you don't want to change display format) in case of narrow columns. But even then, if you had ^^^record => you would likely want to see the fields of the record. And it's fine, but one minor detail. - if you have a display format that shows the address(es) in the value column => then the top-level line shows all the addresses anyway => so all info is present. - if your display format does exclude the address, and you use the "address column" => then that only shows the first deref address So in the 2nd case, some addresses wont be shown... Quote from: 440bx on March 27, 2024, 01:14:33 amIn the case of FpDebug, I think that  having a button that doesn't even need to be clicked, just hovered upon, to present some "formatting trick" reminders would be useful. Maybe... Would depend on getting feedback on which "tricks" other people would find useful. And yes, a bit of a catch22: Many of those who would find them useful wont know them, and therefore can't give feedback. But those who do, might have ideas what they think others would.... Also, it isn't as straight forward. Some of those rely on the backend. The ".." only exists in FpDebug (as do all of those https://wiki.freepascal.org/FpDebug-Watches-Intrinsic-Functions ) Which means, not only does the list have to know the backend... There is also the case that a user learns about ".." and then need to remote debug with gdb, and suddenly it stops working. Then again, gdb has intrinsics too. But - within the IDE - that has not been tested (and may depend on gdb version). QuoteFor 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) FpDebug does casting and converting. And hopefully the same way as FPC. (Gdb does not always do it the same way...) That includes Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  TFoo = packed record a,b: byte; end;var   foo: TFoo;      bar: word;begin  foo.a := 1;  foo.b := 2;  bar := word(Foo); You can enter "word(Foo)" as watch. QuoteOf course, as previously mentioned, this isn't really about formatting, it's really a feature request: a little cheat sheet window with useful formatting tricks.  Also, initially it would only have a few, non-obvious, tricks which could be added on as new ones are thought of.  IOW, initially having just 3 or 4 tricks (or even less) in the little window would be fine. Maybe you can open a new topic on that (and moderate the topic), and see what others think. In general, the debugger has tons of features that are probably seldom used. * E.g. using the breakpoint hitcount. If some code (testcase, that always runs the same behaviour) which is deeply nested in a loop, and fails after a certain amount (> 100) of calls, then just setting a breakpoint wont do it. You would have to single step more than a 100 times over the problematic line. - set a non-breaking breakpoint, run the app, when it fails read the "pass count" of the breakpoint. Note that it passed (e.g.) 123 times. - restart the code, this time with a breakpoint that has its hitcount set to 123 (so when it is about to be passed for the 123 time, it will stop). * The history window - if you debug focus sensitive code - export the stack and watches of a crash, to be reviewed by a colleague. * even watchpoints => I suspect are not as well known as they deserve * pausing other threads (beta-ish) * enable/disable breakpoints as other breakpoints are passed (with conditions on the other breakpoints) But all that needs to go into another thread (if of interest) Btw: Blaise Pascal Magazine has some Articles on the Debugger (starting most basic, IIRC in issue 105 with stepping)... They offer a free subscription. I don't know if you can download the old one though (the German/Brasil subscription seem to allow that, by their description) ---------------------------------------------------------------------- Martin_fr · 2024-03-27 14:58 Back to the Watch property dialog... At this point more of an update than a query. - For comparison, including the original.... - And ignore the obvious need for changing/fitting the captions. IMHO, space wise its better . Not yet sure on the "sub-dividers". E.g. between number-base and signed-ness. They are needed, but currently still to prevalent. Maybe dotted line. The biggest problem now, is the uniformity of this big matrix. (Even though the checkboxes and lines help a little bit). If you know that an option is in there, you can't quickly locate it. There are to few "visual anchors". So I am going to play with a few dropdowns on the "all" pages. - downside: if you are all new, you have to open them to know what is in - upside: once you know what's available the can guide your eyes to the correct location (they provide easy to find visual differences in the grid) Functionality-wise, each checkbox enables the section in front of which it is. - Checkbox = off => radios are all deselected and defaults apply - Checkbox = on => the settings of the radios apply Clicking a radio will auto-set the checkbox On the individual pages, I will try to print the defaults on top of the tab. On the "all" page, there isn't enough space for that. (there may be a hint, when hovering) ---------------------------------------------------------------------- 440bx · 2024-03-28 19:35 Short reply for now... will get into more details when I'm not so "squeezed" for time. Quote from: Martin_fr on March 27, 2024, 12:38:24 pmQuoteFor 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 ? Quote from: Martin_fr on March 27, 2024, 12:38:24 pmMaybe 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. Quote from: Martin_fr on March 27, 2024, 12:38:24 pmIn 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! ---------------------------------------------------------------------- Martin_fr · 2024-03-28 20:22 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 · 2024-03-28 20:55 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 ---------------------------------------------------------------------- Martin_fr · 2024-03-28 21:15 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. ---------------------------------------------------------------------- Martin_fr · 2024-03-29 23:08 I am getting somewhere.... At least I think. "Number(2nd)" will unfold, if selected. Outside the "all" tab, it will be always unfolded. Despite the space being less, it still shows a lot.... I am reflecting if - Enum,...: can/should be folded (only "all" tab). That is, if "Name/Letter" is selected, then the number settings are collapsed   - Alternatively, on the "all" tab, enum does *not* show "signed- ness" at all (only number base) / or at least folds that line   - The number setting for enums, previously an the "all" tab, where merged with the normal number settings. That could be restored... - "Address" needs to be on the all page... Or could be folded, until the checkbox is checked. - All Signedness could alternatively (on the "all" tab) be made a dropdown, at the end of the number-base line. Yes, the horizontal lines are a bit heavy. Probably going to test them as dotted. But first of all, I have to fix the entire handling of the display formats (which I broke, as I changed some settings). Btw, the "digits" count (a minimum digit count), will if set (e.g. to 1) stop hex numbers from displaying leading zeros. Hex and bin, will have the ability of spacing between bytes/words/dwords. (instead of separator) ---------------------------------------------------------------------- 440bx · 2024-03-30 00:08 My $0.02 on the above pic are... I'd have lines only between the main groups but no separating lines in the same group. I'd put a little more white  space between main groups.  It would make the window a little bit taller but, I think it would look less cluttered (actually, I should say not as dense... I don't think it's cluttered). ETA: added the comment in parentheses. ---------------------------------------------------------------------- Martin_fr · 2024-03-31 11:02 So, I gave different amount of dividers a try... You are right, on the first glance it looks better without the dotted lines inside each section (Image 2). But, then for something like "Structure", it becomes hard to tell, that there are 2 groups of radios. Right now, all radio groups are single lined... But what if that can't be kept that way? I tried little "grip handles" as indicators for each group. But... ---------------------------------------------------------------------- 440bx · 2024-03-31 14:35 Quote from: Martin_fr on March 31, 2024, 01:02:50 pmBut, then for something like "Structure", it becomes hard to tell, that there are 2 groups of radios. That's also true for the "pointer" group and is a valid concern.  OTH, I think that most, if not all, programmers would quickly realize that they are dealing with independent option groups. Quote from: Martin_fr on March 31, 2024, 01:02:50 pmRight now, all radio groups are single lined... But what if that can't be kept that way? That could become a real problem because my comment above in a way depends on that.  At this stage, it's a potential problem I'd keep in mind but, as they say, I'd cross that bridge if and when I get there. As far as dividers, I think you're right that some sort of visual divider between the groups is needed.  Figure 3 (without the dividers) feels, at first sight, a bit like an alphabet soup.  The presence of dividers really give a welcome structure to all the information present. ETA: I like the second one best.  I see the use of the "size grips" but, I can't manage to like them.  To me, they don't feel like they belong there.  That said, I don't have an alternative to offer at this time. ---------------------------------------------------------------------- Martin_fr · 2024-04-06 17:40 I committed a new attempt. Also new settings. If you made global defaults, then some of them have to be redone. Quote from: 440bx on March 16, 2024, 10:12:02 pmCurrently in the Watches window, when a record is being watched, the address of the record is included in the output - which is very nice for those who are doing low level debugging. It would also be very nice if the address did _not_ include all the leading zeroes.  I did include that option for normal numbers, but did not thought of pointers. For normal numbers it is now possible to give a min-digit count.  E.g. for an array of byte, it may be nice to have them all showing 3 digits with leading zeros. And if the min-digit is set to 1, then no extra zeros will be shown. For a value of 0 min-digits, hex numbers show the full widths of the type of the data (which has always been that way, and now is made the default). Pointers don't really need "min-digits". So I still need to add a simple checkbox for "short". ---------------------------------------------------------------------- 440bx · 2024-04-10 14:41 Quote from: Martin_fr on April 06, 2024, 07:40:39 pmI committed a new attempt. There are still a number of things I have to test in the trunk version but... here are a few comments.  The attachment is mostly for convenience.  IOW, it doesn't show any problems. First, I think the Watch Properties really looks much cleaner than it did in the recent past.  Definitely an improvement. In the attachment, I don't understand why "Address" is there.  I tried changing the settings but I didn't see any changes in how the information was displayed.  Did I miss something ? I also tried changing the settings "Hide Pointer", "Show Pointer", "Only Pointer" and didn't see any side effect.   Basically, if those options don't do anything then maybe they shouldn't be there. The new set of buttons is also a definite improvement.  The button that shows the "data address" didn't show anything for the record I was watching.  Was the column supposed to remain empty in that case ? The icon with the little red x is a very noticeable improvement over the previous icon and the dialog box asking for confirmation is most welcome Another very welcome improvement is the assembly window. It looks a lot better than it used to. One thing the screenshot does not show is that when debugging a 32bit executable, pressing F9 causes the assembly window to show up and execution is stopped "somewhere".  I say somewhere because the assembly window shows someplace in ntdll but, it definitely isn't stopped where it is showing because single stepping a few times causes jumps that don't make any sense, for instance, after executing a non- jump/non-call instruction, the instruction pointer is not on the next instruction but in a completely unrelated function/area.  It's not tracking its location correctly. NOTE: I'm using v3.2 most of the time.  I'll try to use v3.99 more. ETA: Added the attachment that shows the Assembly window when first attempting to debug a 32bit executable.  It shows execution stopped in ntdll but, that's very unlikely to be correct because single stepping about 5 instructions causes the executable to run. ---------------------------------------------------------------------- Martin_fr · 2024-04-10 15:11 Quote from: 440bx on April 10, 2024, 04:41:05 pmIn the attachment, I don't understand why "Address" is there.  I tried changing the settings but I didn't see any changes in how the information was displayed.  Did I miss something ? I also tried changing the settings "Hide Pointer", "Show Pointer", "Only Pointer" and didn't see any side effect.   Basically, if those options don't do anything then maybe they shouldn't be there. Right that is for "classes" (object instances) only. (And interfaces). Those have a hidden pointer that can be shown. And, in that case, it would affect the display of that address within the "value" column (not the "address" column). For top level object values, that is a duplication, because you can view it in the address column. But for nested object instances, it has meaning. (The idea is, to offer control to set this independently for top level and nested) That needs to be fixed. QuoteThe button that shows the "data address" didn't show anything for the record I was watching.  Was the column supposed to remain empty in that case ? object(class instance), interface, ansistring, dyn-array, ... QuoteAnother very welcome improvement is the assembly window. It looks a lot better than it used to. Use the force... Aeh, I mean CTRL key. And it shows you jump targets (and - on click - jumps (display) there too). Provided you use FpDebug. The editor options offer color config for the asm too. QuoteOne thing the screenshot does not show is that when debugging a 32bit executable, pressing F9 causes the assembly window to show up and execution is stopped "somewhere".  I say somewhere because the assembly window shows someplace in ntdll but, it definitely isn't stopped where it is showing because single stepping a few times causes jumps that don't make any sense, for instance, after executing a non- jump/non-call instruction, the instruction pointer is not on the next instruction but in a completely unrelated function/area.  It's not tracking its location correctly. ETA: Added the attachment that shows the Assembly window when first attempting to debug a 32bit executable.  It shows execution stopped in ntdll but, that's very unlikely to be correct because single stepping about 5 instructions causes the executable to run. I need a lot more info on that. And ideally a new thread or a bug report, since this will likely add a bit of an exchange and is unrelated to this topic here. For starters: register window (showing EIP), Callstack, Threads. Possibly at some time some logs. Could "SetRedEnd" somehow end up in image loading? (Not that it necessarily is, it could be unlabeled kernel code *after* the routine of the displayed name). It would stop there for the "int3" (which I believe you have enabled). Single stepping should ideally step asm instructions, and eventually step out. Or get into a finally/except block. ---------------------------------------------------------------------- 440bx · 2024-04-10 16:20 Quote from: Martin_fr on April 10, 2024, 05:11:09 pmI need a lot more info on that. And ideally a new thread or a bug report, since this will likely add a bit of an exchange and is unrelated to this topic here. Before I address the above, thank you for all the very useful information you provided in the post above. About the bug report and "ideally a new thread", I will create a new thread and attach the problem program's source code. ETA: New thread: https://forum.lazarus.freepascal.org/index.php/topic,66927 .msg513960/topicseen.html#new ---------------------------------------------------------------------- Martin_fr · 2024-04-18 19:20 Quote from: Nicole on February 27, 2024, 06:14:21 pmPlease let me have a checkbox "display in dateformat". Often I have data in the format double, e.g. 45122. That should now be fully possible in 3.99. See image. In the image, it has been set to show both, the human readable date, and the float. That can be configured. (red box) You can also configure the format for the date (see https://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html ). (green box) Different formats can be given for each type (TDate, TTime, TDateTime). So you can decide what happens if a TDate has a time different from 0. You can add other types (yellow box), if you have your own Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type TMyTime = double; You can also repeat the config, and add different setting for different nest levels. That is values shown in the array could be shown shorter. If the array gets expanded (and each element listed in its own line) then those expanded values are at nestlevel = 0 (top level). But in the single line display, where all array entries are coma separated, they are at level=1 (or in the case where the array is in a record, they are at level 2) You can also set the formatter for each watch. (blue box / watch properties) - You can disable the formatter - You can choose a specific one (if you have set up formatters with different format-string yyddmm...) - You can set up formatters inactive (Not checking the checkbox in the options list), and those will not be applied unless specifically selected in the watch properties) There is a topic on "value formatters" https://forum.lazarus.freepascal.org/index.php/topic,66186.0.html Quote from: 440bx on February 27, 2024, 12:56:36 pmFrom the thread htt ps://forum.lazarus.freepascal.org/index.php/topic,66398.msg508570.html #msg508570 It would be nice if the characters in a null terminated array of characters were displayed without single quotes and without commas separating them. I added a value formatter, that will show an array of char as string. You can add the value converter (global or per project). - To add a new formatter, first select the type-of-formatter in the drop down, then press add. - "match type by name" (brown box) you would probably want an "*", so it acts on any typename. (It will only act if it is an array of char). - There is a checkbox (brown box), to select if it should stop at the last char before the first #0  encountered. - You do want "Replace/Hide original value", or the array data is shown on the same line before/after the string. It only changes the displayed value (and what gets copied to clipboard). At current it does not prevent the watches window from showing a [ + ] symbol to expand the array. Please test. ---------------------------------------------------------------------- 440bx · 2024-04-18 20:11 Very nice.  Thank you Martin. I have to download the new trunk version and give it a workout. ---------------------------------------------------------------------- 440bx · 2024-04-18 20:37 I tried updating my copy of Lazarus trunk using FPCUPDELUXE (which is what I normally do) and got an error when compiling Lazarus which seems to be related to FpDebug. Please, refer to the screenshots. The first screenshot (...A) shows that an error occurred when compiling "...arrayofchartostring.pas" The second screenshot shows the compiler was expecting a resource file (and its name) it was unable to find. HTH. ETA: added "(and its name)" ---------------------------------------------------------------------- Martin_fr · 2024-04-18 20:40 I fixed it while you were building.  I forgot one file (and the CI failed and notified me). Try again, please. ---------------------------------------------------------------------- 440bx · 2024-04-18 20:55 Quote from: Martin_fr on April 18, 2024, 10:40:17 pmI fixed it while you were building.  I forgot one file (and the CI failed and notified me). Try again, please. Success!!   Thank you! ---------------------------------------------------------------------- Martin_fr · 2024-04-19 16:50 Just a note on the "char array to string" => It is limited by the overall length of the array. The manual cast "^char(@arrardata[1])" => is a different expression sent to the backend, and the backend then figures out what data to sent based on that expression. The "Value Formatter" does not change the expression. The backend does still evaluate that array, and returns that data. Like a "DisplayFormat" (e.g. hex/dec/bin for numbers) the "Value Formatter" merely changes how this data is displayed (and it omits some data, if it is told to stop at #0). This also means that there is a difference for sparse arrays. (arrays with memory gaps between their elements). If an array of char for some reason had each element aligned to a 4 byte boundary, then there would be 3 empty bytes between the element. (Afaik no way to make that happen with fpc, but...). The array would show "'a','b','c'", the display-formatter "'abc'", but the "pchar" trick would show "'a'#1#2#3'b'#4#5#6'c'" (depending on what trash would be present in the gaps, or if it was #0 it would cut off). However, the Value formatter does assemble the pascal "char" as code- units into an utf8 string. (Of course, setting a codepage could be added). Internally that is owed to the strict differentiation between a frond and back end. It is possible that (at extra cost), Value formatters off the future could evaluate extra data. There also is a "backend converter" which can handle this in the backend. A further difference between work done in the front or back end is, that data stored in debug history can not be updated by the backend (as the debug process is no longer in the state that it was). But front end formatting can still be done. (even if currently access to that is not yet implemented) ---------------------------------------------------------------------- 440bx · 2024-04-19 17:13 I'll keep all that in mind. I got one thing to finish before I can give this latest version a good workout. But, I don't need to finish anything to thank you again for all that work.  FpDebug is getting to be a really nice debugger.  In many ways I find it more enjoyable than VS' debugger, that has been my "gold standard" for years and now I find FpDebug more responsive and intuitive.   Good stuff ... and getting better. ---------------------------------------------------------------------- Martin_fr · 2024-04-27 22:38 Quote from: 440bx on February 08, 2024, 12:11:06 am In the screenshot, it would be very nice if the "DECODER_MODE" (4th variable from the top) could be shown in hex instead of decimal (that mode is the result of or-ing a bunch of masks and seeing it in hex would definitely be helpful.) Should be possible now. There is a "value formatter" that allows to set any display format (e.g. hex). It will only be applied to matching types. Matching normally goes by typename, but can match (parts of) the variable/expression. For type matching, rules are given here https://wiki.freepascal.org/IDE_Window:_Ide_Options_- _Backend_Value_Converter#Match_types_by_name "*" is the only wildcard known. You must match a type, even if you (optionally) match the watch expression. (see red box in image) For the name, you can either use the prefix var: expr: "var:" will match the expression of the watch. If that is a structure, fields will also be tested against the exact expression (so you can't match the fieldname / except when you [ + ] expand, then the expanded watches have the fieldname) "expr" has the fieldname added for the fields. No the example matches "expr:*.foo"  any expression ending in .foo => fieldname = foo "expr:foo" the entire expression being foo (top level watch, no dot in there) ---------------------------------------------------------------------- 440bx · 2024-04-28 00:26 That sounds really good and I figured I'd give it a try.  To that end, I upgraded my version of trunk to the one that was active about an hour ago and gave it a try. When I tried, I don't get the options in the "Value Formatter" that are shown in your screenshot.  I attached what I get. What did I miss ? ---------------------------------------------------------------------- Martin_fr · 2024-04-28 00:34 Have you tried the dropdown? Above the add button? And then after you made a selection in the dropdown press add? The one in the checkbox list are the pre-installed ones. The other you need to activate yourself. I still have to write up docs... ---------------------------------------------------------------------- 440bx · 2024-04-28 01:04 I'm still missing something... can't make it work. Attached is what I've got.  I'd like the field "DECODER_MODE" to be shown in Hex.  Can you tell me what settings I need ? Thank you. ---------------------------------------------------------------------- Martin_fr · 2024-04-28 08:52 because the "var" is ... ... in the single line (the non expanded line): "decoder" ... the expanded line (*): decoder.DECODER_MODE      or if it is a class maybe even: typecast(decoder).DECODER_MODE the "expr" is in both cases: decoder.DECODER_MODE    (or with typecast) so you want to match... (I can't see what type it is, or if you have that included, so I use longint, if it word or byte .... replace it Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i longintexpr:*.DECODER_MODEexpr:DECODER_MODE expr:*.DECODER_MODE matches any of the cases above, anything ending in  .DECODER_MODE expr:DECODER_MODE  matches if "decoder" is a class or advanced record, and you are in a method of it, and enter just  DECODER_MODE. (*) "the expanded line" It does not repeat the DISPLAY of its parent line. It hides the "decoder." => but the variable that is watched is "decoder.DECODER_MODE" You can see that, if you drag and drop it to a location outside the expanded area (make it a watch of its own) ---------------------------------------------------------------------- 440bx · 2024-04-28 19:37 Thank you Martin. After playing a little bit with all the new options, I settled for Tools->Options->Display Format->General->Number->Hex and Number(2nd)->"Show value in a second format", "Decimal", Separator checked. Now all my numbers show in both, hex and decimal.  Great stuff and I don't even have to incur in a custom value formatter Thank you again, this is really good.  I have no doubt I'll eventually come across a case where using a value formatter will be the appropriate solution. The information you provided in the post above will undoubtedly come in handy.  I also saw your new post about "Debug visualizers" and read the new documentation you wrote. ---------------------------------------------------------------------- Martin_fr · 2024-05-11 11:18 Quote from: han on March 03, 2024, 12:56:45 pmOne more remark. Two dimensional arrays defined as [0..height,0..width] are in Evaluate/Modify displayed as tables. As soon the array is three dimensional it is no longer displayed as a table. Assume the array is defined as [0..2,0..height,0..width] I would expect three tables of width x height. See screenshot. I have started on this. Not yet complete... In the watch properties (and the defaults in the global/project options) it is now possible to set the nest-level up to which line wrapping occurs. ("0"/zero => no wrapping at all). That will display deeper nested arrays (and class/records) with a new line for each entry. However, if you have different array-depth, then it can happen that even the most inner array may be line wrapped. So instead of Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (100,101,102)you would get Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (100,101,102)which may not be wanted. Currently for that, you must fore each watch change the max-depth setting in the watch property. I am thinking of adding an option "Do not wrap array, if entries are basic types" => that is if the elements of the array are not structures or arrays they will be kept in one line, even if the max- depth would have them wrapped. It will be an options, so if you an array of integers shown vertical, it will still be possible. I may also add other options. Maybe control amount of indent (currently 2 spaces), different max-depth for array vs structure, empty line between elements on top level,... This setting has only effect if watches are shown multi line (evaluate, hint, watch-detail pane) Watch detail pane and evaluate window now have an option to toggle line wrap.  (though Windows does not abide to it, if the length exceeds 1024) Quote from: Martin_fr on April 06, 2024, 07:40:39 pmQuote from: 440bx on March 16, 2024, 10:12:02 pmIt would also be very nice if the address did _not_ include all the leading zeroes.  I did include that option for normal numbers, but did not thought of pointers. Pointers/Addresses now have a checkbox to omit leading zeros. ---------------------------------------------------------------------- 440bx · 2024-05-11 11:26 Quote from: Martin_fr on May 11, 2024, 01:18:47 pmPointers/Addresses now have a checkbox to omit leading zeros. That's great.  Thank you, all those zeroes have to be visually parsed out to see the _actual_ number. ---------------------------------------------------------------------- Martin_fr · 2024-08-30 12:07 Quote from: han on March 03, 2024, 12:13:05 pmb) The information len=3 is correct but it is a three dimensional array. That raises a question on how to handle, when to display what. Your example code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var img: array of array of array of string;begin  SetLength(img, 3,10,10); Please note there are 2 ways of displaying additional indexes 1) "combined" list of all/several indexes at top level 2) "nested" additional individual "len:" prefixes at the start of each nested. Then 2nd can (and will as option) be added (and can also be used as fallback). The questions is about the "combined at top" ony. With dynamic arrays you can have Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   SetLength(img, 3,10,10);  SetLength(img[2,5], 3); So the debugger must iterate through all nested entries to confirm the array is equal sized (which of course makes the result valuable because it becomes a confirmation that all nested arrays have the same size. But, what if the data is not "available"? For_info:The debugger has configurable safety limits how many entries to read from an array. And they must exist. Imagine a bug, overrode the array with random data, and now the array says it has a length of several million in each dimension. The debugger must not try to fetch the entire faulty data, or the debugger itself crashes on out of mem. If the nested array is big enough not all entries are evaluated. The debugger can't check all of them. What should it do? - only display "combined" for those that it has fully checked - be optimistic and assume the other checks would have succeeded - be optimistic, but add some marker that the size isn't fully checked: "Len: (10, 3?, 5?):" or similar. (And yes, if it is static arrays (as far as it can be determined), then the size has to be the same for all nested static array) ---------------------------------------------------------------------- Thaddy · 2024-08-30 12:17 Since the memory can be aligned on dimensions, I think the only correct option would be the second one. ---------------------------------------------------------------------- Martin_fr · 2024-08-30 12:31 Quote from: Thaddy on August 30, 2024, 02:17:33 pmSince the memory can be aligned on dimensions, I think the only correct option would be the second one.The ability of aligning memory relates how to the example that I gave? ---------------------------------------------------------------------- Thaddy · 2024-08-30 13:27 Yes, because you should not make the mistake that multi-dimensioned arrays are always consecutive memory. They may align on the boundary of the dimensions - in fact they do depending on declaration - and that is much harder to express in a debugger. Maybe I expressed it not accurate enough. ---------------------------------------------------------------------- Martin_fr · 2024-08-30 14:15 Quote from: Thaddy on August 30, 2024, 03:27:38 pmYes, because you should not make the mistake that multi-dimensioned arrays are always consecutive memory. They may align on the boundary of the dimensions - in fact they do depending on declaration - and that is much harder to express in a debugger. Maybe I expressed it not accurate enough. Maybe, you inaccurately interpreted my text as making such an assumption? Nothing that I described relies in any way on where in memory the data is. Nor is the resulting display giving any info on where the information resides, merely which size (given as count of elements) individual parts of the data have. OK, I just figured out a potential point of misunderstanding.... In my text I declared 2 numbered cases. But I made no question about them (neither if, nor how they may be applicable or any other question). I actually made a bold (literally bold text) statement, that I wanted to talk about the first of those 2 cases only. I then made a question with a list of 3 possible answers (each starting with a dash). When you replied, I took it as an answer to my question (because it did not state, that it ignored my question and potentially was a comment on something else, and it did refer to "second" which identifies one of the proposed replies from my dashed list). Quote from: Thaddy on August 30, 2024, 02:17:33 pmSince the memory can be aligned on dimensions, I think the only correct option would be the second one. The 2nd proposed reply was Quote from: Martin_fr on August 30, 2024, 02:07:54 pm- be optimistic and assume the other checks would have succeededYour answer made no sense at all. But then, if you referred to something else, was it just the "case list" or the "case list" in combination with some special scenario described somewhere in my post, and if so what was the scenario? ---------------------------------------------------------------------- Martin_fr · 2024-08-31 22:30 An array (Including an multidimensional/nested array) can be the most outer (nested) array in a value. Or it can be not an most outer (nested) array. Example Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var foo: array[0..3,0..3] of record   // most outer nested array   bar: array[0..3,0..3] of byte;  // not most outerend;var foo: array of array of record    // most outer nested array  bar: array of array of byte;  // not most outerend;var xyz: record    foo: array of array of record   // most outer nested array (even though it is nested, but not in an array)    bar: array of array of byte;    end; end; What is a good short name for the "not most outer" ? ---------------------------------------------------------------------- 440bx · 2024-08-31 22:59 Quote from: Martin_fr on September 01, 2024, 12:30:28 amWhat is a good short name for the "not most outer" ? terms that come to mind are: "outer array", "outermost array", "boundary array", "topmost array", "enclosing array". I like "outermost", I think that one has the most obvious meaning. ---------------------------------------------------------------------- Martin_fr · 2024-08-31 23:04 Quote from: 440bx on September 01, 2024, 12:59:59 amQuote from: Martin_fr on September 01, 2024, 12:30:28 amWhat is a good short name for the "not most outer" ? terms that come to mind are: "outer array", "outermost array", "boundary array", "topmost array", "enclosing array". I like "outermost", I think that one has the most obvious meaning. What is a good short name for the "not most outer" ? Any of them, as there can be many levels. - It's not nested, because "array of array" is nested. - It's not "just in a structure", it only counts if it is in an outer array Background: For configuring the "len" prefix, and when it is and isn't shown, there will be. - A depth, in the current nested-run: Len=3: ( Len=2: (1,2), Len=1: (1),  Len=2: (1,2) )   if the "depth" says "0 nested" then only "len=3" appears. - An option, if that is done only for the outermost array (even if that is in a structure), or if it is repeated on the "inner" arrays too. I am aware, it seems strange to not just go for: top level(not nested in any way) versus any-nested. But, for the global Displayformat settings (tools options) the plan is, that each default can be given for - most outer of everything - nested in any form So that allows to set a more verbose numeric default for watches that return just a single number, yet for watches that have structures/arrays with many numbers the format can be more brief. Yet, this option wont be in the "watch properties" => if you configure for a specific watch, you (usually) know if it is a structure. So then you can directly set numbers to the brief format. (and same for any other). Except, the in watch properties you only have one setting for array. You can change that if the array is in a structure. But if the array is in a structure in an outer array, then the one setting applies for both. And to cover that case, there needs to (would be nice to be) a switch. And that switch therefore only cares about the existence of an outer array run. Since multidimensional arrays will have settings (either to combine as han requested), or a depth that is relative to the multidimensional run), this only applies if array that are in other arrays are separated by any non-array (structure, pointer, ...) ---------------------------------------------------------------------- Martin_fr · 2024-08-31 23:27 Also, I am still contemplating how exactly to go about those "defaults for nested" Because, in case of the array length, it already includes the "depth" for the current multi-dimensional. Also because in the watch-properties itself you can only give one config for array or struct (even if there are nested // or nested runs). So that brings up some issues. A default for nested, can only be used, if it is nested in any type that differs from the current. E.g. a default for nested structure applies to data nested in an array. But not to data nested in an outer structure. Otherwise at least array and structure also need configs for nested in watch properties. That however would create a new issue: Config for the nav bar, can be nested within a multi dimensional array (with no need to interrupt the run) But the len prefix can only be ?nested? per "run". So that gets a bit crazy.... ---------------------------------------------------------------------- 440bx · 2024-09-01 02:50 Quote from: Martin_fr on September 01, 2024, 01:04:11 amWhat is a good short name for the "not most outer" ? the "not" flew over my head Taking the "not" into account, I'd go for "innermost" or if wanting to specify any array except the outermost then "not outermost" (which is basically "not most outer" but in two words instead of 3, which is valid English - ask Joanna )  or  "inner array(s)" (which basically precludes the outermost since that one isn't inside another array.) IOW, generically any "not most outer" is an "inner array". ---------------------------------------------------------------------- Martin_fr · 2024-09-03 17:28 Quote from: han on March 03, 2024, 12:13:05 pmb) The information len=3 is correct but it is a three dimensional array. Now you can chose to have either Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Test: array [0..2,0..1] of integer; Len=(3, 2): ((99, 0), (0, 0), (0, 0))Len=3: (Len=2: (99, 0), Len=2: (0, 0), Len=2: (0, 0))Len=3: ((99, 0), (0, 0), (0, 0))((99, 0), (0, 0), (0, 0)) Or, if you have something like Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Test2: array [0..2,0..1] of record  Foo: array [0..2,0..1] of integer;end; Len=(3, 2): (((Foo: Len=(3, 2): ((0, 0), (0, 99), (0, 0));), (Foo: Len=(3, 2): ((0, 0), (0, 0), (0, 0));)),((Foo: Len=(3, 2): ((0, 0), (0, 0), (0, 0));), (Foo: Len=(3, 2): ((0, 0), (0, 0), (0, 0));)),((Foo: Len=(3, 2): ((0, 0), (0, 0), (0, 0));), (Foo: Len=(3, 2): ((0, 0), (0, 0), (0, 0));)))The "multi-dim array len" start for eache multi-dim array. Now one issue is setting up a default. The "combined len" will always cover all dimensions. But in the top example the repeated "Len=2" may be too much, after all it is easily visible that there are just 2 elements. And even worse, for a list of empty arrays. So, yes you can custom configure that when the data has been retrieved from the debuggee. But that means constant changing. So I am about to add: "If the innermost array has a length less than then hide the "Len=" header". Actually even allow hiding for several levels, if overall the element count, and printed text length is below configurable limits. Similar for line-breaks. You may normally want each item in an array (or field in struct) to be on its own line. Except if you have "array of integer". Or maybe, also not if you have "array of array of TPoint. The inner list op points could be  on a single line? Configurable, but such that a default can have criteria when to go which way. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Test3: array [0..3,0..5] of TPoint; Len=(4, 6): (((x: 99;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;)),((x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;)),((x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;)),((x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;), (x: 0;y: 0;))) So currently I am thinking of the following options to configure how the debugger decides. The simple form is to just say - Multi dim array len : Always covers the entire depth. - Cover N-levels: Covers the outer most N levels (of each individual multi-dim array / i.e. "Test2" restarts counting for "Foo". And for multiline: - For the outer N levels display each entry on a new line (level can be array, or structure) (pointer may increase the level, even though it does not add linebreaks) In both cases there will be similar "rules" to hide the len or go single-line, if the data is "simple enough". Those rules can for example be used to setup defaults. Array - Only if more than N levels depth (per multi dim array) - Only if the array at the current level has a LEN < N - Only if each element is either "simple" or has less than N simple value (e.g in fields or arrays) - Only if each value as text is shorter than N chars Multi line - Only if within the N innermost levels - Only if less than N fields for struct - Only if less than N Len for array (this may not be applied to the innermost array in all cases, since an "array of integer" probably does not need this) - Only if each element is either "simple" or has less than N simple value (e.g in fields or arrays) - Only if each value as text is shorter than N chars ---------------------------------------------------------------------- DarioGL · 2024-09-04 12:18 In the image below shows something funny in the watches window (the detail of k[1..6] shows wrong information, starts with 0 in 1 position and the first element does not show properly). And i use the image to be able to request 2 things: To be able to hide the memory address of pointers and to be able to configure how many decimals are shown. Regards! ---------------------------------------------------------------------- Martin_fr · 2024-09-04 12:46 Quote from: DarioGL on September 04, 2024, 02:18:36 pmIn the image below shows something funny in the watches window (the detail of k[1..6] shows wrong information, starts with 0 in 1 position and the first element does not show properly). There was a fix (after 3.4 had been released) that might be the issue you have.  If so, this will be in 3.6 Though I need minimum source-code to reproduce, and check if it is the same issue. QuoteAnd i use the image to be able to request 2 things: To be able to hide the memory address of pointers and to be able to configure how many decimals are shown. Both of this should be in 3.99 (and eventually a 4.0 release). They will not be in 3.6. In 3.99 those settings can be configured as default for all watches, and then modified individually for each watch if needed. ---------------------------------------------------------------------- DarioGL · 2024-09-04 13:33 Quote from: Martin_fr on September 04, 2024, 02:46:44 pmQuote from: DarioGL on September 04, 2024, 02:18:36 pmIn the image below shows something funny in the watches window (the detail of k[1..6] shows wrong information, starts with 0 in 1 position and the first element does not show properly). There was a fix (after 3.4 had been released) that might be the issue you have.  If so, this will be in 3.6 Though I need minimum source-code to reproduce, and check if it is the same issue. QuoteAnd i use the image to be able to request 2 things: To be able to hide the memory address of pointers and to be able to configure how many decimals are shown. Both of this should be in 3.99 (and eventually a 4.0 release). They will not be in 3.6. In 3.99 those settings can be configured as default for all watches, and then modified individually for each watch if needed. This is great news, thank you so much for your answer. Regarding the code, can be a bit hard to extract, i can share the structs we use thou: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const      maxfuen=300000;   {861} {16383} type     Base=packed record  // packed so we can understand c++: struct __attribute__ ((__packed__)) fuen        fig        : longint;  {1= , 2=Arc , 3=Line , 4= , 5= , 6= , 7= ini poli , 8=, 9= , 10= punto }          b1         : boolean;        nOrd       : longint;          k          : array[1..6]of double;        ba1,bb1,bc1: boolean;          colel      : longint;     end;    basep=^base;     tbase=array[0..maxfuen] of basep;     pbase=^tbase; var    fuen:pbase;    the ^129 in the image is a position of the fuen variable. Thanks again! ---------------------------------------------------------------------- Martin_fr · 2024-09-04 20:37 Thanks, yes I am pretty certain it is the recently fixed issue. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41073 Patches for 3.5 https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432 https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/eaa2c85a358ea8a60d1b94820d46159c4eb85707 ---------------------------------------------------------------------- DarioGL · 2024-09-05 07:58 Quote from: Martin_fr on September 04, 2024, 10:37:00 pmThanks, yes I am pretty certain it is the recently fixed issue. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41073 Patches for 3.5 https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432 https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/eaa2c85a358ea8a60d1b94820d46159c4eb85707 Great! Thanks a lot for your help. Now, im sorry for the n00b question, but... is there a way to get the 3.5 as of now, even if its not released? Or to apply the patch over the version 3.4 and rebuild? Just a link with minimum explanations should be enough. Thanks! ---------------------------------------------------------------------- Martin_fr · 2024-09-05 08:25 The easiest way to install any branch from git is FpcUpDeluxe. To just apply the changes. (On linux files are usually write protected, and you need to be root to edit them, but then can continue with your user account) Gitlab can show you the commits (must be done for each) as diff/patch https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432.diff https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432.patch Either of them can be applied using the "patch" utility (part of linux / on Win part of fpc) Given that there are only 2 lines of code changed, you can just edit the files by hand.  Open the file in an editor, change the 2 lines. THen in the IDE, menu Tools, Build Lazarus, and restart. ---------------------------------------------------------------------- DarioGL · 2024-09-16 11:22 Quote from: Martin_fr on September 05, 2024, 10:25:04 amThe easiest way to install any branch from git is FpcUpDeluxe. To just apply the changes. (On linux files are usually write protected, and you need to be root to edit them, but then can continue with your user account) Gitlab can show you the commits (must be done for each) as diff/patch https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432.diff https://gitlab.com/freepascal.org/lazarus/lazarus/- /commit/c462f7256eb55c8c54853a2a3e57ce633c088432.patch Either of them can be applied using the "patch" utility (part of linux / on Win part of fpc) Given that there are only 2 lines of code changed, you can just edit the files by hand.  Open the file in an editor, change the 2 lines. THen in the IDE, menu Tools, Build Lazarus, and restart. Cried of happiness! thank you so much! ---------------------------------------------------------------------- Martin_fr · 2024-09-22 10:58 Quote from: avra on February 29, 2024, 11:49:01 amit would be nice to have a way for quick change of data representation without having to dig into some settings form each time. For example, numbers can be represented in decimal, hex, octal or binary form, and default could be decimal. It would be nice if I would be able to quickly change representation of a single variable (or even whole data type at once) with something like a simple SHIFT+CLICK which would simply loop through possible representations. That could be used for other data types as well (like single/datetime). The Context menu now has a "Format" sub-menu that lists some common format settings. Choosing an entry *copies* the selected setting to the watch. It is the same as making the settings in the properties. So there isn't an "un-select" the entry. => If your watch was shown decimal, and you chose "Hex", then it will be shown in Hex. But you don't have an option to "un-hex", you would need to chose "decimal" from the list. (requires the format to which you want to go to be present. => Only selected "setting groups" are copied. E.g. you can copy number format, without affecting float format. But if you set "hex" you also set "hex grouping". => It does not cycle through options. => This also means, that it does not override a "value formatter" if that value formatter is configured to have precedence over the watches own settings. Otherwise, you can in the watch properties (yes, needs to open the properties) chose a "value formatter" and there are value formatters wich are (just) a display-format. This list of pre-sets can be configured in Tools > Options > Debugger > Display Formats > Presets. And there is also a per-project list in the project settings. --- EDIT: The context presets menu (and properties too), now work for multiple selected watches. However only top-level watches can be changed. Watches in expanded views, always take settings from their top-level watch (this is a todo) Quote from: han on March 03, 2024, 12:13:05 pmEditor hint. b) The information len=3 is correct but it is a three dimensional array. Multiple array dimensions can now be shown. Provided the arrays are directly nested (e.g., *NOT* "array of pointer to array" and *NOT* "array of record foo: array...") and all nested array have the same length (and the debugger has gotten enough data to know those length are all the same) Quote from: han on March 03, 2024, 12:56:45 pmOne more remark. Two dimensional arrays defined as [0..height,0..width] are in Evaluate/Modify displayed as tables. As soon the array is three dimensional it is no longer displayed as a table. Assume the array is defined as [0..2,0..height,0..width] I would expect three tables of width x height. See screenshot. The level of line-wrapping can now be configured. - It can be set to a fixed level - There are some "smart" settings, that prevent multi-line for the innermost data, if that data is simple enough - presets can be created for different levels and be used to quickly change the level.