Copy link to clipboard
Copied
I have written a Javascript script to run in Illustrator so that it can create particular irregular polygon paths for me when I need it. Some of the lines being drawn are not what I was expecting and it's at this point that I would usually add some debugging lines into my code to see what's what. As far as I can tell, in Adobe Illustrator, I need to add the lines
$.write(myValue);
$.writeln(myValue);
In the past, when using previous version of Adobe Illustrator, I can recall a window appearing with my debugging in it. On this current version:
v2015.0.0
I cannot seem to find it anywhere. I have googled this question a bit and I have only come away more confused. How can I see my debugging for my simple script? Do I need a plugin? Can anyone recommend one?
Thanks,
Phedg1
1 Correct answer
Use
alert('your message')
Instead of
$.writeln ('your message')
Explore related tutorials & articles
Copy link to clipboard
Copied
Are you using the Extendscript app to generate the .js files?
Copy link to clipboard
Copied
I am not using Extendscript, I haven't heard of it. I just created an empty .js file using Visual Studio and wrote my code from scratch.
Copy link to clipboard
Copied
there was a very handy debugging window pre-CS6, but it was removed
Copy link to clipboard
Copied
Are there any plugins that do an equivalent job? Is 2015 CC before or after CS6? I can't tell.
Copy link to clipboard
Copied
CS6 was illustrator version 16. 2015 CC is version 20.
Copy link to clipboard
Copied
I can't believe they'd just remove it without giving us something else to do the job, it makes no sense.
Copy link to clipboard
Copied
Moved to the scripting forum.
Copy link to clipboard
Copied
ExtendScript ToolKit will provide debug messages including breakpoints, function stack data browser.
But if you want a simple log, you can output your message to a log file.
FWIW
Loic
Copy link to clipboard
Copied
Use
alert('your message')
Instead of
$.writeln ('your message')
Copy link to clipboard
Copied
for ( i = 0; i<1000; i++ ) {
confirm ("Don't you want to throw your computer away now ?" );
}
…
I won't use modal alerts unless at a final stage. The scenario I am describing here happened to me on some occasions
Copy link to clipboard
Copied
right?, throw that thing away, really, alerts have their place but I think it's absolutely necessary to use the estk and $.writeln for debugging other than the simplest procedures, there's no error free code from the get go.

