Page 1 of 1

PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.

Posted: Tue Jan 30, 2024 12:46 am
by Quin
If you use DisableDebugger in a console app and then attempt to close it, whether that be with alt+f4, control+c, or any other method, it seems to hang for a few seconds, before the IDE reports that it crashed. Removing DisableDebugger makes this not happen. I've confirmed this happens on PB 6.10 B3 and B4 on Windows 10, 64-bit. No other configurations have been tested yet. Here's the code:

Code: Select all

DisableDebugger ; Comment out to avoid apparent crash.

OpenConsole("Test")
Input()
End
This is incredibly misleading to say the least, it lead to me digging through loads of git logs to try and narrow down when this "crash" started happening, until I finally found that it was caused by turning off the debugger. Is it possible for this to be looked into?
Thanks!

Re: PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.

Posted: Tue Jan 30, 2024 3:14 am
by normeus
To disable debugger uncheck "Use Debugger" from Debugger menu at top ( debugger still runs even if you type "DisableDebugger" )
From help:

Code: Select all

Syntax
  
  DisableDebugger

Description

This will disable the debugger checks on the source code which follow this command. It doesn't not fully turn off the debugger, so performance checks should not be done using DisableDebugger command, but by disabling the debugger before compiling the program. 
Usually there are little nuances in PB like DisableDebugger not fully disabling the debugger, but the help file will usually have a solution or description that could help.

Norm.

Re: PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.

Posted: Tue Jan 30, 2024 3:28 am
by Quin
I see, thanks! What's the function of DisableDebugger then? Is it useful at all on its own? The only reason I've ever thought to disable the debugger is for performance reasons. Are there other considerations?
normeus wrote: Tue Jan 30, 2024 3:14 am To disable debugger uncheck "Use Debugger" from Debugger menu at top ( debugger still runs even if you type "DisableDebugger" )
From help:

Code: Select all

Syntax
  
  DisableDebugger

Description

This will disable the debugger checks on the source code which follow this command. It doesn't not fully turn off the debugger, so performance checks should not be done using DisableDebugger command, but by disabling the debugger before compiling the program. 
Usually there are little nuances in PB like DisableDebugger not fully disabling the debugger, but the help file will usually have a solution or description that could help.

Norm.

Re: PB 6.10 B3 and B4: Using DisableDebugger in a console app leads to false crash messages.

Posted: Tue Jan 30, 2024 7:41 am
by Fred
It doesn't stop anymore on breakpoints which can be very useful. You can also disable debugger only on some block code as you can use EnableDebugger to reenable it.