Reputation: 5660
Yesterday I was about 2 hours in to working on my Pharo image when I accidentally wrote some code and executed it that caused an infinite loop -- actually, I was calling one method from another method, which in turn called the original method, back and forth forever. The pharo image was unresponsive. I restarted the image and lost all my work for that two hours!
I looked online and I can hit alt
-.
to get into some sort of process viewer? How can I kill the infinite loop from there?
Upvotes: 13
Views: 3558
Reputation: 13396
You can indeed use <action key>-.
(where is cmd for mac, probably ctrl for win and alt for linux (but it seams that some times is ctrl on linux and also alt on windows. For example Pharo 6.1 uses alt on win 10).
<action key>-.
causes user interrupt and opens a debugger on a place that was being executed.
Upvotes: 12
Reputation: 5041
Apart from interrupting an infinite loop as @Uko explained, you probably do not have lost all your work for that two hours, as you feared.
If you have killed Pharo externally without saving you could always use the
Upvotes: 14