View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Sat Aug 04, 2018 7:56 pm Post subject: New features for DEBUGGER |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Wed Apr 03, 2019 7:10 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Wed Apr 03, 2019 7:54 am Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Sun Oct 06, 2019 8:54 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Fri Jan 10, 2020 12:30 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Sat Jan 11, 2020 10:18 am Post subject: |
|
|
Amazing. No one uses debugger.
The absent here is "Change the value of the variable" |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1896
|
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri Jan 24, 2020 10:41 am Post subject: |
|
|
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
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
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1896
|
Posted: Sat Feb 15, 2020 2:03 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Sat Apr 27, 2024 3:29 pm Post subject: |
|
|
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? 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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Sat Apr 27, 2024 4:52 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Sun Apr 28, 2024 6:17 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Sun Apr 28, 2024 8:11 am Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2863 Location: South Pole, Antarctica
|
Posted: Mon Apr 29, 2024 1:42 pm Post subject: |
|
|
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 |
|
|
|