soccer jersey forums.silverfrost.com :: View topic - New features for DEBUGGER
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New features for DEBUGGER
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sat Aug 04, 2018 7:56 pm    Post subject: New features for DEBUGGER Reply with quote

Would be great to add to debugger the possibility to chose range of array indices when displaying large multidimensional arrays. If you click to open the window which prints array content, on top of it would be good to have small menu which allows to restrict indices within specified range.

Another a bit more complex feature would be to display the array content in graphics form. Native %PL now can do that. Just add XY plotter where user can specify X and Y ranges, normalization on own maximum or specified values and LOG/LINEAR axis options. I have a prototype for that to play.

The Surfaceplot and 3D array visualization with OpenGL would be more complex but also more selling feature.


Last edited by DanRRight on Sat Apr 27, 2024 4:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Wed Apr 03, 2019 7:10 am    Post subject: Reply with quote

Absolutely a must is highlighting matching DO/ENDDO and IF/ELSE/ENDIF

You hover mouse over IF, ELSE or ENDIF and debugger highlights all other starts and ends of it.

Often you can not find any beginnings or ends of these constructs
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8011
Location: Salford, UK

PostPosted: Wed Apr 03, 2019 7:54 am    Post subject: Reply with quote

I think that would be a useful addition to Plato but it is not really something you could reasonably put into an independent debugger. An editor like Plato already has lots of functionality to make this possible.

The Win32 and x64 debuggers can be integrated with Plato so this would be possible for users who are happy to use Plato as an IDE.

For C/C++ programs, Plato already has something like this for matching curly brackets and the same sort of thing could be added for Fortran programs.

Notepad++ has a similar feature. If you select say "DO" then the corresponding "DO" in "END DO" is also highlighted provided the space is used to separate "END" from "DO".

The suggestion of using a hover event is a little more challenging but eminently doable given time/manpower.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sun Oct 06, 2019 8:54 pm    Post subject: Reply with quote

Tried to suggest one more time to add to the SDBG the ability to see starting and ending line of DO/ENDDO , IF/ENDIF but found this was already discussed recently and i missed it.

It took me few months to recognize that i saved same data many times overwriting older one because by mistake placed saving data into the body of long DO/ENDDO. Was wondering why after do loop increased to 500-1000 from 50 some quick before operation started to lag like a hell. I even catched the event of saving data to harddrive by stopping debugger exactly on it (because opening files and saving data usually takes noticeable time) but still was surprised why this small saving was going excessively long.

So the reason was that i had DO loop starting and ending kilometers of source code away from this point where saving took place.

That is what happening when the source code is growing and growing and at some point it becomes unmanageable without good debugger. Similar situation with saving data many times in a loop by mistake i guarantee happened to everyone in a lifetime.

Isn't matching do/enddo if/endif is what compiler must to recognize first and hence can pass this info to the SDBG? If user ask about start_line or end_line of specific DO loop it just show the line number or jump to it. Surprised no one asked to add this feature 30-40 years ago, i must be in all Fortran4 of Fortran-66 debuggers, it does not matter that there were not the DO/ENDDO constructs but "DO label" ones. Isn't strange that some editors are doing that but SDBG does not? Ideally would be that SDBG to tell the start/end of do loop by right clicking on its counting variable ijk like in DO ijk=1,1000

I did not use Plato. In the past i tried it and this ended in many suggestions to add this and that and fix this and that. Hopefully it matured already to works with many files and many projects as easy as with BAT files by just changing directory by moving mouse from one Total Commander screen to another (i have 6 of them of different background color open with 12 windows) and clicking on BAT file. Same ultimate simplicity is with the source code files: the used award winning Notetab editor (not Notepad) has all the sources in its tabs and opens them in one click and keeps open for months.

As to Notepad++, thanks for suggestion, may be it's time to switch to this editor. Few of them got some useful features lately.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Fri Jan 10, 2020 12:30 pm    Post subject: Reply with quote

You are in SDBG or SDBG64 looking at some variable I called DoNotplot_Traj_WithEnergy_LessThanMeV pondering what you can do with this variable



Please tell me in less than 30 seconds (let alone 30 years debuggers exist) what is absolutely obviously missing among the provided options? This very important for debugging options actually exists mentioned in the Help but is hidden so much and is so cumbersome to execute (requiring typing this variable name) that nobody besides probably me in the entire world knows it
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sat Jan 11, 2020 10:18 am    Post subject: Reply with quote

Amazing. No one uses debugger.
The absent here is "Change the value of the variable"
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Thu Jan 23, 2020 12:58 pm    Post subject: Reply with quote

Sometimes it is expedient to change a variable value (or even a register value) in the middle of a debugging session. The capability to do so is provided in many modern debuggers. See, for example:

In GDB: https://sourceware.org/gdb/current/onlinedocs/gdb/Altering.html#Altering

In Visual Studio:
https://docs.microsoft.com/en-us/visualstudio/debugger/autos-and-locals-windows?view=vs-2019#edit-variable-values-in-the-autos-or-locals-window

As you noted, simply changing a value may not lead the programmer to any clue regarding a proper fix. However, when a variable value has a notably incorrect value, and it is not easy to restart the program and reach the same program state (for example, the n-th time that variable x becomes < -123.456, with n not yet known) it can be very useful to "repair and limp up to the next town where a waggonwright is available".

I hope Dan will overcome his coyness and spill the secret to changing values of variables in SDBG/SDBG64.
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri Jan 24, 2020 10:41 am    Post subject: Reply with quote

Dan,

I agree, it would be nice having the opportunity to change a variable value using the menu in the debugger (as you remarked).

However, the functionality to change a variable in sdbg/sdbg64 is easily available by means of the comand line tool and the let statement: I use to type character L and the command line tool opens and then I add/complete the let statement for the variable I want to change.

Which proves that I am using sdbg/sdbg64 Wink

I would like to give the hint that for sdbg64 the Window menu does not contain submenu "Open units" which is the case for sdbg (32 bit); I know that for sdbg the functionality of displaying the open units is available via command
Code:

streams

However, if you enter the streams command to the command tool of sdbg64 an information window pops up saying that the streams command is not yet available. It would be nice to have this functionality in sdbg64.

Regards,
Dietmar
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Sat Feb 15, 2020 2:03 pm    Post subject: Reply with quote

John S., here is something closer to the truth:

https://www.youtube.com/watch?v=PNNWNO0XM4Q

Debugging ain't always easy. Inspired improvisation may be needed -- note the use of a pizza cutter for calculating Pi.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sat Apr 27, 2024 3:29 pm    Post subject: Reply with quote

We discussed this before and this feature was included at least in PLATO. Now would be nice to upgrade the option of finding matching IF/ELSE/ENDIF and DO/ENDDO in PLATO and add similar one to SDBG64

The problem with the current facility in PLATO is that it only works if the IF/ELSE/ENDIF are fitting on one-two screens or at least are not far away so that you do not find matching words using PgDn and PgUp or mouse scrolling. When you start doing scroll you eventually cross other IFs/ENDIFs and the matching mechanism resets losing initial place. In one case I was unable to find matching IFs at all no matter how many times I tried.

Almost ideal example how it should work can be found in amazing editor called KATE which exists for Windows and Linux and is free (this is not an advertisement, since no one can convince Fortran users in anything) . Unfortunately it still hiccups if the text has pretty large amount of IF/ENDIFs ( i submitted the bug report ). In this editor when you click, say, on ELSE word just one time it gets yellow background and shows matching IFs/ENDIFs everywhere in the file no matter how far from the original place. If you click on ELSE twice it also get yellow but does not show matched IFs/ENDIFS but shows only the same ELSE words everywhere in the file and so on. Same with DO/ENDDO. Also exists the way to hide the entire DO/ENDDO and IF/ELSE/ENDIF with a single click on left panel or highlight it by just placing mouse there - haven't i already said KATE is literally genial editor deserving standing ovations? Smile Doing matching searches besides advantages KATE has some minor disadvantage somewhere compared to PLATO, is this a bug or "feature" - i did not decide ( there exist some things there i do not like too )

/** Would be also great if PLATO simply copied KATE coloring scheme, i find it awesome, and the ability to automatically adjust the coloring scheme of text no matter what language out of very many you decide to use (fixed or free style for example)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8011
Location: Salford, UK

PostPosted: Sat Apr 27, 2024 4:52 pm    Post subject: Reply with quote

For Plato, DO/ENDDO etc. are highlighted if you select this option from the Settings dialog on the main Tools menu. It is on the Miscellaneous tab.

The text cursor must be placed on a line such as DO or ENDDO. Then, if the matching line is not visible, you should use the shift key and the mouse wheel to scroll the text without moving the text cursor (until you see the matching highlighted line).

I take the point that this could be improved. This is just to clarify what is currently available.

The debugger can be run directly from Plato by selecting "Integrate with SDBG/SDBG64" from the same Settings dialog and the same Miscellaneous tab. With this option, whilst debugging, Plato is used to display the code together with the syntax colouring etc.. But there are currently two disadvantages to this...

1) For Win32, the response time for stepping can be very slow.
2) For x64, debugging directly is currently not always stable and might cause Plato to crash.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sun Apr 28, 2024 6:17 am    Post subject: Reply with quote

Thanks Paul. That worked. But this trick with holding Shift which is hidden and easy to forget would not be needed at all if utilize the method of KATE editor.

Also, please look how much easier to find matching keywords IF/THEN/ELSE in Kate.
Notice also marked options at the left panel allowing to shrink/expend or highlight the entire IF and DO blocks.

As an additional suggestion may be adding bubble help telling about the line numbers of matching keywords would be also great.



(This is WINE where Windows and Linux work simultaneously in mutual understanding of each other, your colors and fonts could be different. At the right in Kate is not a colorful dirt, it is the entire listing of the file is shown, very convenient feature)


Last edited by DanRRight on Sun Apr 28, 2024 11:34 am; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8011
Location: Salford, UK

PostPosted: Sun Apr 28, 2024 8:11 am    Post subject: Reply with quote

Dan

I will aim to take a look at "Kate" at some point to see how the highlighting works when the text cursor is not in the visible screen.

Plato already includes "outlining" (see the popup menu from a right click on the text).

Don't forget that Plato is an IDE with lots of features dedicated to FTN95 etc..
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Mon Apr 29, 2024 1:42 pm    Post subject: Reply with quote

Nice would be to see there highlighting of matching brackets like in Kate. Like these

I think both of these highlights - IF/ENDIF/DO/ENDDO and brackets - have to be ON by default, and not in the Miscellaneous rarely who looks into. Or i miss it? I think they were in Plato before
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group