Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extendscript Toolkit debugger fails: Can't start debug session

Not a programming problem per se, but rather a programming environment problem that I have been unable to find a solution to.

The problem relates to Adobe's Extendscript Toolkit (both 3.5 and 4), but so far I haven't been able to solve the problem, so here I am...

The error I get has appeared more or less over night. I didn't experience this problem yesterday, nor this morning. But exactly WHAT has happened is beyond me. I have removed preferences, I have uninstalled, reinstalled, created a new user, restored old preferences from Time Machine and I'm now pretty much lost for options.

Basically, nothing works in ESTK anymore. Just opening ESTK and entering alert('Hello') won't work. Neither will $.writeln(). Everything running from within ESTK seems to give the same error;

Cannot execute script in target engine 'main'

With details:

Cannot execute script in target engine 'main'!

(#1116) Can't start debug session.

Below is a screenshot taken from the new user I created to test, same problem.

Screenshot of the problem on a new user

The "funny" thing is that all the scripts (InDesign CS5, still hanging on to it for reasons) still work perfectly in the applications' script panels. So there is nothing wrong with the scripts (heck, they haven't changed one bit, and still refuses to run in ESTK).

As mentioned, I've tried installing the ESTK CC (version 4) as well, but the very same problem occurs there. Which leads me to think the problem lies somewhere else, but I do not know where, and why.

So, if anyone can shed any light on this issue, at all, I would be very happy. Debugging is basically the only thing ESTK is good for in my book, but now that even that functionality is gone, I don't know how to efficiently debug the scripts which is kind of hampering the workflow.

For reference, I'm running InDesign CS5 (from the old Creative Suite) on a 2008 Mac Pro with 10.11.6 (El Capitan) installed. Well aware that it's pretty out of date, but that is beside the point here.

like image 961
Bornhall Avatar asked Nov 20 '18 09:11

Bornhall


People also ask

How to use ExtendScript debug in Visual Studio Code?

Press the play button or F5 to start. In your project, go to the debugger and click the little gear icon and choose ExtendScript Debug. A new launch configuration will be created for you with following configuration: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes.

What is the JavaScript debugger toolkit?

The Toolkit includes a JavaScript debugger that allows you to: Single-step through JavaScript scripts (JS or JSX files) inside an application. Inspect all data for a running script. Set and execute breakpoints.

What happened to the ExtendScript toolkit in Visual Studio Code?

The Extendscript Toolkit has been deprecated in favour of The VS Code Debugger! This information is preserved here for legacy reference, but the Extendscript Toolkit is no longer being actively maintained or supported, and will no longer work on 64-bit-only versions of MacOS.

How to debug a script in Visual Studio Code?

Pick a launch config from the dropdown on the Debug pane in Code. Press the play button or F5 to start. In your project, go to the debugger and click the little gear icon and choose ExtendScript Debug. A new launch configuration will be created for you with following configuration:


2 Answers

In the above mentioned forum, Adobe has published a stable workaround!You just have to correct a setting inside the estk application:

  1. Open the file(Mac): “/Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/SharedSupport/Required/cdic/11BTBackend.jsx”
  2. Search for the value: 604800000 (line reads bt.timeout = 604800000)
  3. Replace that value with 604800 and save
  4. Quit ExtendScript Toolkit and relaunch.

I can confirm that it works.

like image 108
Hauke Avatar answered Sep 19 '22 16:09

Hauke


From the adobe Forum :
"we have found a first workaround: just change your date to any date before 20-nov-2018"

https://forums.adobe.com/message/10761440#10761440

Seems like a date issue :(

like image 44
Tristan G. Avatar answered Sep 21 '22 16:09

Tristan G.