Copy link to clipboard
Copied
Hi,
After-Effects has a problem with try {} catch() {} in scripts.
I will refer to "debugger" as "Extendscript Toolkit CC"
Given the following script:
try {
throw new Error("test");
}
catch(e) {
$.writeln("message: " + e.message);
}
If I open AE, then run the following script via command line `AfterFx.com -r myscript.jsx`, then the debugger opens, the line "throw new Error.." has a breakpoint and an error message with "uncaught exception".
If I close the debugger, and run again this script via the command line, it crash again and again.
If I don't close the debugger, and run again the script via the cli, it works and displays "message: test" !
If I run again this script via the debugger after AE startup, then it works directly.
Anyone has found out how to get rid of this behavior ?
Copy link to clipboard
Copied
I'm not sure why you are receiving that behavior, but Adobe has deprecated ExtendScript Toolkit in favor of their new debugger plugin for Microsoft Code. Have you tried with that debugger?
Copy link to clipboard
Copied
I will try later after uninstalling ESTK, I fear the fact of not being able to debug CEP extensions (extenscript part) & Panels.
Copy link to clipboard
Copied
Not sure about VS Code, but ExtendScript Toolkit has a menu entry
"Debug->Do not break on guarded exceptions"
Does it help to activate this?
Copy link to clipboard
Copied
Thanks, but it is already enabled by default.