Page 1 of 1

Debugging PureBasic Open Source IDE ends in error

Posted: Thu Jan 18, 2024 2:20 am
by ChrisR
From a previously built PureBasic Open source, I debug it by opening PureBasicIDE.pbp project, then Compil/Run (F5).
If I drag'n drop a .pb source file into the new IDE in debug mode, I get this error:
It works fine if I open the same .pb file via Menu File Open

Code: Select all

[10:51:31] [ERROR] UserInterface.pb (Line: 2713)
[10:51:31] [ERROR] WindowEvent(): WindowEvent() and WaitWindowEvent() can not be called from a 'binded' event callback.
CallStack:
WindowsMisc.pb Line 482 - MainWindowCallback(5704844, 563, 2908595355768, 0)
WindowsMisc.pb Line 314 - FlushEvents()
UserInterface.pb Line 2713

Re: Debugging PureBasic Open Source IDE ends in error

Posted: Thu Jan 18, 2024 5:31 pm
by fryquez
Disabling Debugger in UserInterface.pb --> FlushEvents() seems to help here.

Code: Select all

Procedure FlushEvents()
  DisableDebugger
  While DispatchEvent(WindowEvent()) ; returns the eventid
    EventLoopCallback()
  Wend
  EnableDebugger
EndProcedure
But actually, it's ok for Release, but Debugger reports error :?:
Also the good old Console Debugger allows to skip such errors.
Why can't the GUI debuggers continue program execution here.

Re: Debugging PureBasic Open Source IDE ends in error

Posted: Thu Jan 18, 2024 7:03 pm
by ChrisR
Indeed, it's strange, it works with the Debugger disabled but not when enabled!
I'll have to try it, I've never used the good old console debugger until now.
fryquez wrote: Thu Jan 18, 2024 5:31 pm Why can't the GUI debuggers continue program execution here.

Re: Debugging PureBasic Open Source IDE ends in error

Posted: Mon Oct 06, 2025 11:24 pm
by juror
Working on a 2015 prog using PB 5.45. This post likely saved me hours of debug time.
Thanks for the save.