ExtendScript Toolkit will not stop on breakpoints

Anyone, especially newbies, asking for help with photoshop scripting and photoshop automation - as opposed to those contributing to discussion about an aspect of photoshop scripting

Moderators: Patrick, Mike Hale, xbytor, Larry Ligon, Andrew, PS-Moderators

ExtendScript Toolkit will not stop on breakpoints

Postby cmyk » Sat Jan 07, 2012 6:59 am

If you come across an instance where the ExtendScript Toolkit will not stop on breakpoints, this might help.

Having the following in your include will keep ESTK from stopping at breakpoints :
Code: Select all
$.level = 0;
even if it is enabled in the calling script.

To fix this, the debugger should be enabled in the main script AND in any includes.
Code: Select all
$.level = 1;

An alternative solution would be to omit the debugging line from your include entirely and only enable it in the main script. Simply turning it off in the include will prevent ESTK from stopping on breakpoints.

Hope this helps.
cmyk
 
Posts: 106
Joined: Tue Aug 22, 2006 8:30 pm
Location: Del Boca Vista

Re: ExtendScript Toolkit will not stop on breakpoints

Postby Mike Hale » Sat Jan 07, 2012 5:04 pm

I find that ExtendScript Toolkit will sometimes not stop for breakpoints even if $.level is set to 1 or 2.

When it doesn't want to stop at breakpoints it sometimes helps to step through the first couple of lines then click play. For some reason that seems to help.

But I have found times that it will not stop no mater what I try. For those times I have to add both the $.level = 2; and debugger; to force a break.
Mike Hale
Site Admin
 
Posts: 4332
Joined: Fri Sep 30, 2005 10:52 pm
Location: USA

Re: ExtendScript Toolkit will not stop on breakpoints

Postby cmyk » Mon Jan 16, 2012 7:02 am

Nice, I'll have to remember those tips. Just came across
Code: Select all
$.bp()
as another method of inserting a breakpoint.
cmyk
 
Posts: 106
Joined: Tue Aug 22, 2006 8:30 pm
Location: Del Boca Vista


Return to Help Me

Who is online

Users browsing this forum: No registered users and 1 guest