If your application uses the #execLongOperation:message:* variety of methods to take advantage of the mechanism to display a progress bar while a long running operation is in progress, you probably have experienced the joys of trying to debug the code wrapped up in the block. When a break point is hit , about all you can do is inspect the current state of objects, but you can not continue stepping though the code.
Before I discovered the secret to debugging such code blocks, I used to go so far as to comment out my call to the execLongOperation:message:* statement so that I could step through the code. This approach works, but there is a better way that does not involve modifying your code; and better yet, it already exists in your image (though if running pre 8.6 code, you will have to apply a fix .. see below).
The secret is to execute the following snippet of code before running the code that kicks off the long operation:
EtWindow execLongOperationsInBackground: false.
When this value is false, the code block never gets forked onto the background process, so the debugger is able to step through the code in normal fashion.
If you are running versions of VA Smalltalk prior to 8.6, you will need to modify the EtWindow>>#execLongOperation:message:allowCancel:showProgress:
method to avoid a bug where the operation runs once in the UI process, then again in a background process. There is one occurrence of the following snippet of code in this method:
self #execShortOperation: runBlock .
The code should be preceded by a return (^) character so that the code block does not run again in a background process:
^ self #execShortOperation: runBlock .
Enjoy the beauty of debugging Smalltalk code even more!
Bob