Topic: SF2 Debugger useability

Here is some feedback on using the new debugger and suggested improvements.

(1) When a program runs to completion in the debugger, the big "Stop" symbol is shown at the bottom of the debugging panel on the left. However, the debugger doesn't stop running. You have to press the "Stop" button on the toolbar or menu or ctrl-shift-f7 to stop it and disable the debugger toolbar and debugger menu options.

(2) Console window automatically closes at the end of debugging so you can't see the output. A "keep open" option is needed or revert to using the panel on a tab.

(3) When running in the debugger, the Status bar is constantly changing to indicate some background indexing is taking place. I suggest this should be turned off during debugging as it isn't needed. Having it turned on slows down the debugging session too much (at least on my not very fast laptop).

(4) Disable editing of source during debugging. Having the "caret" follow the current line (triangle) pointer when stepping is annoying. You need to keep the cursor active though so that a line can be selected for the "run to cursor" option.

(5) When I dsplay the console window and build window in a separate panel at the bottom, debugging starts in the lower panel rather than the top one. Ensure debugging always starts in the top panel.

(6) Show debugging panel automatically when debugging starts.

(7) The issue with stepping into system routines with missing source is better, but why not issue an additional step after the step out to move to the next line. Currently you have to press step in twice to advance.

(8) Need to be able to set conditional breakpoints, count then break etc.

(9) Need to be able to put breakpoints on variables changing in the watch window and switch to that window when a break on a variable occurs.

(10) Need "run to cursor" option in toolbar and menu.

(11) Need to be able to show a debugging terminal in the debugging panel so that GDB commands like print can be issued. This will allow global variables to be printed, and values to be changed.

--
David

Re: SF2 Debugger useability

David,

I'll try to answer each issue you've listed:

(1)  This statement is true.  When the executable terminates, it doesn't turn off the debugger.  This behavior was originally because the program might terminate abnormally, giving you the chance to examine what happened.  It also allows the user to click "Restart" in a sensible manner.  I'd like to leave this behavior in for those two reasons, but perhaps an additional debugger state, "Off," is necessary to clear up what's happening.

(2)  Leaving the console open might be tricky.  That window is opened by GNU Debugger, not Simply Fortran.  I'll see what I can do.  Using the tab panel has proven to be problematic with the debugger because we're working on Windows.  Basically, all debugger interaction with Simply Fortran is handled through standard input/output streams.  Simply Fortran is smart enough to know when the output from the child process isn't a GDB message, displaying it as program output.  However, things get tricky with text input.  A more elaborate system is necessary to put the debugger back in a tab.  I am working on it, though.

(3)  Simply Fortran's indexing and syntax engines will always update whenever a tab is switched.  The indexing is a pretty lightweight, fast process, so I wouldn't worry so much about it.  It is, however, aggressive, and runs whenever tabs are switched.  The syntax engine in contrast is CPU intensive since it is launching the compiler each time.  You can disable this during debugging from the Options menu.  In fact, I would recommend it on single-core systems.

(4) I'm not sure disabling editing during debugging is the best plan.  I understand your use case, but there is something to be said for being able to quickly make a fix as the debugger proceeds, even if you're not going to see the results until a re-compile.  A reasonable number of users complained about Insight's inability to edit when a small typo or bug was encountered, so you'd be limiting options.  Feel free to convince me otherwise, though.  I'm open to ideas.

(5) Simply Fortran's panel management is simple to the point of madness.  Any new tabs will be opened beside the currently selected tab.  So after you move your build and console tabs to the bottom, one of those is the current tab, and future files will open next to them.  Unlike other IDEs, Simply Fortran considers the build and console tabs to be peers with editor tabs, not some other type of tab that can't live amongst the editor tabs.  Fixing this gets back to demands for remembering open tabs, etc. that users have requested.  The 2.x series will at some point implement saved tab positions.  Along with it, some special handling of build and console tabs may fix the behavior you're discussing.

(6) Showing the debugging panel automatically makes sense.  I'll add that.

(7) The extra step has just been added.  Very good point.

(8 and 9) Version 2.0 was to only support the simplest of breakpoints.  It just doesn't have watchpoints and conditional breakpoints yet.  They'll be coming, of course.

(10) "Run to Cursor" will be added as well.

(11) I understand you really want that console.  I'd like to hear from other users as well.  For inspecting global variables, I've relied on Watches myself.  However, everyone's workflow is different.  I'll look into a nice interface for it.

I hope I've addressed your suggestions to your liking. This being the first version integrating the debugger, I expected a long list of bug reports/complaints/suggestions to flow into the forums.  I must say that things have gone better than I originally expected.

Simply Fortran has a long history of rapid updates (46 releases of the 1.x series in about 3 years), so many of your desired features should appear soon.  I really appreciate all the feedback from both yourself and all our users!

Jeff Armstrong
Approximatrix, LLC

Re: SF2 Debugger useability

The issue I have with editing is that the display can quickly get out of sync with the underlying, compiled code. For example, if extra lines are inserted to "fix" a bug, then stepping on following lines won't correspond to what is actually happening. Variable value updates can also get out of sync with what the user is looking at.

Perhaps there will be an option to turn on/off Editing in the debugging... options dialog in 2.1.

With the tabs, I am finding that the debugger always uses the lower panel when it is visible, even if I select or open new tabs in the upper panel. I usually have to close the source file tab and press step for the file to be re-opened in the top panel.

--
David

Re: SF2 Debugger useability

(4) Disabling editing during debugging.

I prefer to leave the code editable during debugging.  Perhaps post a warning flag somewhere to remind users that code being debugged is not an up-to-date compiled executable of teh latest version, as soon as the code is touched.

What I WOULD like to see is automatically exiting the debugger as soon as a user clicks the re-compile icon, instead of the compiled code failing to link/load when it finds the executable is still open in the debugger.

(11) Console

I'm very interested to read this.  I printed and wire-bound a copy of the GDB manual, and found it about as readable as Klingon.  And WHAT a monster manual, too!  Result - I use it as an end-stop on a bookshelf.  Can one of you list a few siomple examples of useful commands producing immediately useful outcome, which one can type into the console?  This would a be a great way for amateurs like me to get started.
---
John

Re: SF2 Debugger useability

The "Continue to cursor" in Version 2.1 works great. Thanks.

The only little thing you are missing Ctrl+Shift+B in the Debugging context submenu obtained by right-clicking (it is in the main Debug menu, just not the context menu.)

At some point a nice icon on the debugging toolbar would be appreciated too. smile

--
David

Re: SF2 Debugger useability

Version 2.2 has the button on the toolbar as requested.

Jeff Armstrong
Approximatrix, LLC

Re: SF2 Debugger useability

Yes it does. Also, the context menu now correctly shows the accelerator keys. Thanks Jeff.

--
David