Problem with Visual Studio Code ExtendScript Debugger - "#15 Can't initialize target"

Explorer ,
Mar 08, 2020

Copy link to clipboard

Copied

Hello,

I keep getting the "can't initialize target" error in my VS Code. 

 

  • Make sure the ESTK stand-alone application is closed
  • Close the target application (example: Photoshop)
  • Close Visual Studio Code
  • Make sure there are no VS "Code Helper" processes in the Activity Monitor (Mac) or Task Manager (Windows)
  • Restart Visual Studio Code
  • Does it work then?
  • If not, does a reboot help?

 

I did all of the above and the problem still persists.

 

OS: macOS Mojave 10.14.6

Premiere Pro version: 14.0.3

ExtendScript Debugger version: 1.1.2

 

Note: I'm just trying to run your example "PProPanel" plugin with no changes to its code (yet) whatsoever.

 

Should the `.debug` file exist in the plugin directory to enable debugging via localhost:7777 on Chrome? I tried with and without it (restarting Premiere and computer in between) and I still can't connect.

 

Also note that the PProPanel plugin does show up in my Premiere Pro and I can interact with it by clicking buttons etc. I just can't connect the debugger.

 

Please help,

Kamil

I FIGURED IT OUT!

 

The solution is quite a hack but since we're all software developers here then it shouldn't scare you.

 

Open ~/.vscode/extensions/adobe.extendscript-debug-1.1.2/dist/extension/ExtensionHelpers.js

 

find a function with the following signature

 

function setActive(target)

 

 and add a similar condition at the beginning:

 

if (target.specifier.startsWith('premierepro')) {
    target.specifier = 'premierepro-14.5';
}

 

in my case I want to connect to Premiere Pro. The extension wanted to connect to the wrong version of Premiere Pro: in my case the specifier string had the value of "premierepro-14.0" which is not the version that I have installed.

 

Overwriting it to the correct version I have FIXED THE ISSUE!

 

Sharing it for posterity here, you're welcome.

Views

332

Likes

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

Problem with Visual Studio Code ExtendScript Debugger - "#15 Can't initialize target"

Explorer ,
Mar 08, 2020

Copy link to clipboard

Copied

Hello,

I keep getting the "can't initialize target" error in my VS Code. 

 

  • Make sure the ESTK stand-alone application is closed
  • Close the target application (example: Photoshop)
  • Close Visual Studio Code
  • Make sure there are no VS "Code Helper" processes in the Activity Monitor (Mac) or Task Manager (Windows)
  • Restart Visual Studio Code
  • Does it work then?
  • If not, does a reboot help?

 

I did all of the above and the problem still persists.

 

OS: macOS Mojave 10.14.6

Premiere Pro version: 14.0.3

ExtendScript Debugger version: 1.1.2

 

Note: I'm just trying to run your example "PProPanel" plugin with no changes to its code (yet) whatsoever.

 

Should the `.debug` file exist in the plugin directory to enable debugging via localhost:7777 on Chrome? I tried with and without it (restarting Premiere and computer in between) and I still can't connect.

 

Also note that the PProPanel plugin does show up in my Premiere Pro and I can interact with it by clicking buttons etc. I just can't connect the debugger.

 

Please help,

Kamil

I FIGURED IT OUT!

 

The solution is quite a hack but since we're all software developers here then it shouldn't scare you.

 

Open ~/.vscode/extensions/adobe.extendscript-debug-1.1.2/dist/extension/ExtensionHelpers.js

 

find a function with the following signature

 

function setActive(target)

 

 and add a similar condition at the beginning:

 

if (target.specifier.startsWith('premierepro')) {
    target.specifier = 'premierepro-14.5';
}

 

in my case I want to connect to Premiere Pro. The extension wanted to connect to the wrong version of Premiere Pro: in my case the specifier string had the value of "premierepro-14.0" which is not the version that I have installed.

 

Overwriting it to the correct version I have FIXED THE ISSUE!

 

Sharing it for posterity here, you're welcome.

Views

333

Likes

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
Mar 08, 2020 0
New Here ,
May 22, 2020

Copy link to clipboard

Copied

I'm having the exact same issue. It was working and suddenly I was getting the same error "15 Can't initialize target". I hope someone looks into this

Likes

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
Reply
Loading...
May 22, 2020 0
Enthusiast ,
Oct 21, 2020

Copy link to clipboard

Copied

I know this is an older thread, but I just wanted to add that in some cases the Creative Cloud app may be the culprit that is generating the "Can't Initialize Target" error because it may be trying to automatically update the application.  You should also quit the Creative Cloud Desktop application.

Likes

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
Reply
Loading...
Oct 21, 2020 0
Explorer ,
Oct 29, 2020

Copy link to clipboard

Copied

I FIGURED IT OUT!

 

The solution is quite a hack but since we're all software developers here then it shouldn't scare you.

 

Open ~/.vscode/extensions/adobe.extendscript-debug-1.1.2/dist/extension/ExtensionHelpers.js

 

find a function with the following signature

 

function setActive(target)

 

 and add a similar condition at the beginning:

 

if (target.specifier.startsWith('premierepro')) {
    target.specifier = 'premierepro-14.5';
}

 

in my case I want to connect to Premiere Pro. The extension wanted to connect to the wrong version of Premiere Pro: in my case the specifier string had the value of "premierepro-14.0" which is not the version that I have installed.

 

Overwriting it to the correct version I have FIXED THE ISSUE!

 

Sharing it for posterity here, you're welcome.

Likes

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
Reply
Loading...
Oct 29, 2020 0