Debugging PureBasic Open Source IDE ends in error

Working on new editor enhancements?
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Debugging PureBasic Open Source IDE ends in error

Post 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
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: Debugging PureBasic Open Source IDE ends in error

Post 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.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Debugging PureBasic Open Source IDE ends in error

Post 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.
Post Reply