Extendscript Toolkit not stopping at breakpoints, why?
I am scripting Illustrator CS5 with the Extendscript Toolkit.
I set several breakpoints in my code, they show up as red dots next to the line number. But when I run the script, it executes all the way to the end without s开发者_运维技巧topping and the breakpoint dots turn dark.
What am I missing here?
Thanks!
Check to make sure $.level
isn't set somewhere, either in your code or the app's startup script. If $.level
is set to 0
or 1
, breakpoints are disabled. You might also try explictly setting $.level=2
at the start of your code, to ensure breakpoints are turned on.
This is a common error in the ESTK (Extendscript Toolkit), I believe it's a bug - breakpoints should not get disabled by starting the script. Most likely pressing F11 (step into) will also make the breakpoints turn into a darker red colour (disabled). But in this state (stepping through the code) you can enable the breakpoints again and they will get hit when you let the script run on (F5). (Shortcuts are for the Windows version.)
Another thing to try is to first start the script from the scripts panel in InDesign (run it once), and then start it from the ESTK. If you use the targetengine directive to set a specific engine name, this might even be necessary.
精彩评论