• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

try/catch crash at least once, and requires debugger opened

Explorer ,
May 24, 2020 May 24, 2020

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 ? 

TOPICS
Scripting

Views

898

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 24, 2020 May 24, 2020

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2020 May 25, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2020 May 26, 2020

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?

Screenshot 2020-05-26 12.30.57.png

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2020 May 26, 2020

Copy link to clipboard

Copied

LATEST

Thanks, but it is already enabled by default.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines