Debug window close on error

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Debug window close on error

Post by Josh »

If my program runs in debug mode on an error and I quit the program to find and correct the error, the debug window closes when I quit my program .

Actually it is in the nature of things that I would need the debug output just in case of an error.
Debug "xyz"
PeekS (0)
sorry for my bad english
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Debug window close on error

Post by Fred »

The IDE should point to the faulty line already and the error is listed in the IDE console. The Debug output is linked to the exe, so it's the way it works. May be it can be changed with an added option. Moved to feature
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Debug window close on error

Post by RSBasic »

+1
Image
Image
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Debug window close on error

Post by Josh »

Fred wrote:The IDE should point to the faulty line ...
The Ide does not point to the faulty line, the Ide points to the line where the error occurred !!!

Especially with memory operations, the error is usually to be found somewhere else than in the line that the Ide marks. For me, the debugger output is still THE tool to search for such errors.

The fact that the debug window now closes automatically (doesn't do this otherwise) when I quit the debugger in case of an error still remains a bug for me.

Fred wrote:May be it can be changed with an added option.
There is no need for an option. The debug output window should only do the same in case of an error as is done in case of no error.

Fred wrote:Moved to feature
When I look at the last time something happened in the 'Feature Requests and Wishlists' section, I will probably have to live with the fact that I have to copy the content of the debug window into a text editor before terminating debugger :evil:
sorry for my bad english
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Debug window close on error

Post by #NULL »

Fred wrote:The Debug output is linked to the exe
If I run

Code: Select all

Debug "123"
then the program finishes and the debug window is still there.
If I run

Code: Select all

Debug "123"
CallDebugger
and then kill the program (and probably the debugger), the debug window is gone. So in the first case you managed to somehow keep or restore the debug output.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Debug window close on error

Post by freak »

The "Kill" option is a shortcut to end the entire debug session (end the program and close all windows) so you can go quickly back to coding and start a new session if needed. If you want to keep the debugger windows around, just hit "Stop" instead of "Kill" and you still have access to all debugger data.
quidquid Latine dictum sit altum videtur
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Debug window close on error

Post by Josh »

Hi Freak, thanks for your answer.
freak wrote:just hit "Stop" instead of "Kill"
In case of an error it is not possible to press "Stop". It's gray.
freak wrote:The "Kill" option is a shortcut to end the entire debug session (end the program and close all windows) so you can go quickly back to coding and start a new session if needed.
In case the program runs to end regularly, the debug output windows will not close and I can go quickly back to coding and start a new session either.


Maybe I missed something in my settings:
Image
sorry for my bad english
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Debug window close on error

Post by skywalk »

Yes, I have the same problem with hard and some easy bugs.
I cannot stop, so have to use kill and I lose debug!
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Debug window close on error

Post by BarryG »

skywalk wrote:I cannot stop, so have to use kill and I lose debug!
There's a Preference setting that can put the Debug Output text into the Error Log of the IDE, so that killing won't lose what was output. It's here:

Code: Select all

Preferences -> Debugger -> Individual Settings -> Display debug output in the error log
Maybe this is a good compromise?
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Debug window close on error

Post by Josh »

Hi Barry,

thanks for the hint. I'm afraid for me it's not a compromise.

I keep the error log window of the Ide on three lines. On the other hand, my debug window is shown in fullscreen mode on a second screen, where my development tools show me tables of my lists/maps.
sorry for my bad english
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Debug window close on error

Post by skywalk »

Same here.
The IDE could drop the bottom log altogether without much grief.
As long as the errors are piped to the DEBUG output.
Then I have those 3 extra lines of real estate for my code!

Side note:
Preferences -> [ ] Show error log <- Disabled still shows error log?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Debug window close on error

Post by BarryG »

Josh wrote:my debug window is shown in fullscreen mode on a second screen
True, I forgot about that.
skywalk wrote:Preferences -> [ ] Show error log <- Disabled still shows error log?
You need to restart the IDE after enabling/disabling it. Alternatively you can resize it to show only one line.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Debug window close on error

Post by freak »

skywalk wrote:Side note:
Preferences -> [ ] Show error log <- Disabled still shows error log?
Its in the section "Default Settings for new Files" so it only applies to sources created from then on. The error log show/hide setting is remembered per source-file. To change it for existing files use "Debugger -> Error Log -> Show Error Log" in the menu. You can assign a shortcut or toolbar button to that menu item in the preferences if you want to be able to toggle it easily.
quidquid Latine dictum sit altum videtur
Post Reply