I wish to harvest the exception stack to open debugger on new Thread while unblocking the thread which threw the original exception. Is it possible in Java?
In Squeak, this method does the work:
StandardToolSet>>#debugException: anException "For convenience. Construct a helper process to debug an exception that occurred in the active process later on so that the active process can (try to) resume. Uses a temporary variable to access and copy the signaler context now before it gets GC'ed." | helperProcess | helperProcess := (Process forContext: anException signalerContext copyStack priority: Processor activeProcess priority) shouldResumeFromDebugger: false; yourself. Project current addDeferredUIMessage: [ helperProcess debugWithTitle: anException description full: false]. ```
anException signalerContext copyStack. I am uninterested in printing the stack trace, I wish to open a resumable debugger on the thrown exception, after having copied the stack out of the current Process to allow that current Process (my event loop) to proceed handling new message sends through its queue of pending sends. Without this the opening of a debugger blocks the event loop. It seems Java is incapable of providing this capability. Woe! So sad.StandardToolSet>>#debugException:cannot be implemented in Java. So LAME!