Runtime errors close debug output window

Everything else that doesn't fall into one of the other PB categories.
Axeman
User
User
Posts: 89
Joined: Mon Nov 03, 2003 5:34 am

Runtime errors close debug output window

Post by Axeman »

Not sure if this is an actual bug, but it's certainly undesirable behavior.

I'm currently trying to track down an array index out-of-bounds issue. For some reason the Debug output window gets closed when the error is flagged. If I put a delay in I can see the window open and then close again when the runtime error causes the program to shutdown. That makes no sense as the output window normally persists after the program ends, and you need it to persist in this case so that you can see the debug information.

This is with PureBasic 5.73 LTS (Windows - x64) with debug mode enabled.

Code: Select all

; Run this with debugger enabled.
Dim TestArray( 3 )
OpenWindow( 0, 0, 0, 200, 200, "Test", #PB_Window_TitleBar | #PB_Window_SystemMenu )
Debug "Output message."
Delay( 1000 )
a = TestArray( 5 )
// Moved from "Bugs - Windows" (Kiffi)
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Runtime errors close debug output window

Post by Rinzwind »

It is also annoying that when you kill your program through IDE (which is indeed the only option you have in your case too) it closes the debug window... It should just stay open whatever.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Runtime errors close debug output window

Post by BarryG »

@Axeman, your code doesn't close the Debug Output window for me with 5.73 LTS (x86 or 64bit). Have you got the preference "Debugger -> Kill program after an error" turned on by mistake?

@Rinzwind: Freak said closing the Debug Output with "Kill" is by design -> viewtopic.php?p=537405#p537405
Axeman
User
User
Posts: 89
Joined: Mon Nov 03, 2003 5:34 am

Re: Runtime errors close debug output window

Post by Axeman »

BarryG wrote: Tue Oct 12, 2021 12:04 pm @Axeman, your code doesn't close the Debug Output window for me with 5.73 LTS (x86 or 64bit). Have you got the preference "Debugger -> Kill program after an error" turned on by mistake?

@Rinzwind: Freak said closing the Debug Output with "Kill" is by design -> viewtopic.php?p=537405#p537405
Yes I forgot that I had that setting enabled, so thanks for the info. I don't think I originally enabled it by mistake though, as not killing the program causes it to go into a messy "Application not responding" busy state.

Ideally there should be a preference setting that lets you automatically shutdown the program on error so that you can edit it while still keeping the debug window open to give access to any available debug info. Outputting debug info is an explicit act and it should be assumed that the developer wants the debug window to persist as a result.
Post Reply