$.level = 2; // Supposedly full debug mode
as the first line in my script. Now, if I hit a runtime error, the ExtendScript Toolkit is brought to front and the script is displayed at the problematic line. In other words, I know that setting the level does have some effect (not setting it at all gives no feedback - the script silently stops execution).
However, the breakpoints in the code are never triggered, no matter if I set level to 0, 1 or 2. How can I get the breakpoints to work? Thanks!
Figured it out. The debug level has to be set to 2, as shown above, and additionally one has to start the script from ExtendScript Toolkit (select Debug -> Run from the menu), and not start the script from Illustrator.