While we’ve all been affected by soft breakpoints being ignored (and often breaks occurring randomly here and there), this is the first time i’ve had the debugger blow past a hard break.
This is on the heels of my recent report of thread sleep woes discussed recently: Thread.SleepCurrent() broken in 2025R2.1 with Preemptive thread - #23 by Peter_Stys
Here is my code snippet inside a pre-emptive thread (compiles a summary after large image load job, details not important), key is the break stmnt at the end:
#if DebugBuild
dim DEBUG_n_loaded, DEBUG_n_NOTloaded as integer = 0
dim DEBUG_me_n_loaded as integer = me.n_loaded.Value
dim DEBUG_itkLoaderMP_n_objects as integer = app.itkLoaderMP.DEBUG_n_objects
dim DEBUG_me_n_total as integer = me.n_total
for tCtr as integer = 0 to nTiles-1
dim t as imageDataModule.imageTileClass = me.tileList(tCtr)
if t.loadedMP then
DEBUG_n_loaded = DEBUG_n_loaded+1
else
DEBUG_n_NOTloaded = DEBUG_n_NOTloaded+1
end if
next
me.DEBUG_saveDebugInfo "Expecting a hard break in loaderWorker"
break
me.DEBUG_saveDebugInfo " Returned from hard break in loaderWorker"
#endif
I have a plain class that instantiates and starts N pre-emptive workers where this snippet executes. With a 2 worker test, my companion logging app clearly shows that program flow reaches the break line in both workers:
but I get only a single break in the debugger; the debugger blows past this line in all but the 1st worker (worker1 eventually proceeds past the hard break further down, but the debugger never pauses).
I will not be filing a feedback case because i was advised that unless I prepare a stripped down test app, not to bother. After spending a lot of time doing this (along with Mike D) for https://tracker.xojo.com/xojoinc/xojo/-/issues/80611 I simply don’t have time to start over again.
Just a heads up to the community that there are issues with pre-emptive threads it seems, and to advise Xojo so they can investigate as they see fit. Makes debugging PE threads very difficult.
