How to debug a script, drawing heavily on an existing Illustrator document?

I am using Adobe Illustrator CS5 and ExtendScript Toolkit CS5.

I have a very confusing script, and alert () no longer works because the stuff is in a loop. How can I simulate the fact that I am using a specific Illustrator document to use the ExtendScript Toolkit debugging features?

I want it to be the same as inside the Illustrator document and go to "File-> Scripts-> Script Name". If I just test the script inside ExtendScript, I get an error

if (app.documents.length > 0) { 

Thanks!

+4
source share
1 answer

Solved!

I had to change the target application to Illustrator in the ExtendScript Toolkit and set the debug level to $.level=2 so that it worked correctly. Now I have breakpoints and all that is good.

+5
source

All Articles