I have been testing some code with SUnit and an upgraded TestRunner (e.g., the TestRunner Enhancements SM package), and I have noticed that when I explicitly put in my code a call to the debugger to interrupt execution and start debugging:
Processor activeProcess debugWithTitle: 'Debug foo'.
I typically receive a debugger but on a different process than the one that ran the above code! Quite often, it is the Morphic UI thread itself. I last noticed that perhaps since TestRunner executes tests on a background process (yeah!) I should be checking invoking #debugWithTitle: on Processor backgroundProcess instead, but that seems unclean: if I just want a reference to the process in which my code is executing, why do I know I have to know anything about what process I am?
I'm sure I'm missing something. Any assistance appreciated. Thanks!
Phil
On Thursday 01 May 2003 08:22 am, Phil_Hargett@groove.net wrote:
I have been testing some code with SUnit and an upgraded TestRunner (e.g., the TestRunner Enhancements SM package), and I have noticed that when I explicitly put in my code a call to the debugger to interrupt execution and start debugging:
Processor activeProcess debugWithTitle: 'Debug foo'.
I typically receive a debugger but on a different process than the one that ran the above code! Quite often, it is the Morphic UI thread itself. I last noticed that perhaps since TestRunner executes tests on a background process (yeah!) I should be checking invoking #debugWithTitle: on Processor backgroundProcess instead, but that seems unclean: if I just want a reference to the process in which my code is executing, why do I know I have to know anything about what process I am?
I'm sure I'm missing something. Any assistance appreciated. Thanks!
It's entirely possible that debugWithTitle: needs to be fixed.
Hi, On Thu, 1 May 2003 08:37:37 -0700, Ned Konz ned@bike-nomad.com wrote:
On Thursday 01 May 2003 08:22 am, Phil_Hargett@groove.net wrote:
I have been testing some code with SUnit and an upgraded TestRunner (e.g., the TestRunner Enhancements SM package), and I have noticed that when I explicitly put in my code a call to the debugger to interrupt execution and start debugging:
Processor activeProcess debugWithTitle: 'Debug foo'.
I typically receive a debugger but on a different process than the one that ran the above code! Quite often, it is the Morphic UI thread itself. I last noticed that perhaps since TestRunner executes tests on a background process (yeah!) I should be checking invoking #debugWithTitle: on Processor backgroundProcess instead, but that seems unclean: if I just want a reference to the process in which my code is executing, why do I know I have to know anything about what process I am?
I'm sure I'm missing something. Any assistance appreciated. Thanks!
It's entirely possible that debugWithTitle: needs to be fixed.
IIUC self halt. or: self assert: false. should really nicely get you there until then.
HTH, Torge
squeak-dev@lists.squeakfoundation.org