Logo-small

4.3.1 How to Interrupt Execution?

It may happens that Pharo seems to freeze. A typical example is when the system goes into a infinitive loop. In such and similar cases, you may want to stop the current execution. There is a combination of keys for such interruption:

Operating systemKeys
MacCmd-.
LinuxAlt-.
WindowsAlt-.

By pressing this key it will interrupt execution in the UI process, and will bring up a Debugger at the current point of execution.

If the interrupt key doesn't work, then the VM may have frozen (rare), or possibly a higher-level Pharo process is running and won't let you interrupt it. If you can repeat the problem, sometimes opening a Process Browser and turning on the CPUWatcher (right click, "start CPUWatcher" ) may help to track things down.

User Contributed Notes

peter.h.meadows (31 January 2013, 11:55 am)

Send kill signal: If your image hangs and you are lucky, the interruption key will help you. If you are not, then you have a different way to know what was happening. You can KILL the VM by sending a special signal and the VM will print the Smalltalk stacktrace of the current processes in the OS console (stdout) or in a .dump file (located in the image path). This is a good last resort when nothing else is working. For this trick, you have to be using latest Cog VM since it is quite new I think. Example:

 

kill -s SIGUSR1 4943

 

Where 4943 is the PID of the VM you want to kill.

 

(from: http://marianopeck.wordpress.com/2012/05/19/pharo-tips-and-tricks/)

Add a Note

Licensed under Creative Commons BY-NC-SA | Published using Pier |