VSCode ExtendScript Debugger on M1: doesn’t ask to select target and selectActiveTarget not found

Participant ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

This isn’t really an InDesign question, but there doesn’t seem to be a specific scripting community anymore (?), so this will have to do…

 

I recently got an M1 (running Big Sur) laptop and am just now getting around to setting up the ExtendScript Debugger extension for VSCode and not having much luck.

 

I’m able to install the extension no problem, and I have my launch.json set up exactly as on my Intel desktop (running Catalina), but I cannot get the extension to actually work.

 

I have InDesign (16.1) open with an open document, and a .jsx file open in VSCode which I’d like to debug. I select my launch configuration (set to use ${file} so it debugs the currently open file). Then I click Run.

 

What normally happens at this point is that I get an error message that no target has been selected. Clicking OK reveals the Select target application link in the bar at the bottom of the app, at which point I can select the desired version of InDesign, then hit Run again and the debugging starts.

 

That doesn’t happen now, though. Instead, it seems to just start debugging straight away – the little pop-up debug menu (with ‘step into’, ‘step over’, etc.) appears and it generally looks like the start of a normal debugging session – but after about three or four seconds of this, it stops. Nothing has happened. Which is hardly surprising, since I was at no point asked to select a target application.

 

If I try to select a target manually, I fare no better. Hitting Select the target application from the VSCode command palette just gives me this error:

 

command 'extension.extendscript-debug.selectActiveTarget' not found

 

The same applies if I try the Select the engine of the target application from the command palette.

 

Both VSCode and the extension itself are the same versions as those installed on my Intel machine, so it’s not a difference between versions. I have not installed ESTK at any point on this machine, so interference from that (which would normally give the “Can’t initialize target” error, anyway) can’t be what’s causing it either – but I’ve been unable to find any useful indicators as to what it is, then, and I have no idea how I could go about debugging the debugger.

 

Does anyone have any idea why apparently the commands related to target selection are missing/not registered/unavailable in my debugger?

TOPICS
Bug, Scripting

Views

148

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
community guidelines

correct answers 1 Correct Answer

Explorer , May 08, 2021 May 08, 2021
Please, download the Intel version of Visual Studio Code and everything will work normal. If you use Visual Studio Code for other programming languages (as I do), you can download both versions: one for Apple Silicon (ARM64) and one for Intel. I just renamed the one for Intel to "Visual Studio Code Intel", and changed the deffault icon (there are tons of png with transparent background that you can use). Now both version live in my dock, and when I need to debug InDesign Script I launch the "Int...

Likes

Translate

Translate
Explorer ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

LATEST

Please, download the Intel version of Visual Studio Code and everything will work normal. If you use Visual Studio Code for other programming languages (as I do), you can download both versions: one for Apple Silicon (ARM64) and one for Intel. I just renamed the one for Intel to "Visual Studio Code Intel", and changed the deffault icon (there are tons of png with transparent background that you can use). Now both version live in my dock, and when I need to debug InDesign Script I launch the "Intel" version.

 

If you log with your account in both versions and enable the configuration and extension sync, you will end up with two ideantical development environtments, one optimized for Apple Silicon and one "optimized" for ExtendScript debugging.

 

Now just hope that some day Adobe updates the Extension to natively support Apple Silicon (latest release is back to 2019)

 

And one final notice: IT DOES WORK with Adobe InDesign 16.3 Beta for Apple Silicon!

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
community guidelines