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

How do you update the target list in VSCode on mac?

Enthusiast ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

I've been unable to use VSCode recently to target installed apps. My Illustrator target is 25.064, and with recent updates it can't find this to load. I tried to locate $HOME/.vscode/extensions to see if I could change via text file but to no avail. Is there a way to update the target or simply call an open app?

TOPICS
Scripting

Views

369

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
Adobe
Community Expert ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

You might be way beyond this, but just checking... Can you edit your launch.json file? Does it look right?

 

Screen Shot 2021-06-25 at 10.07.22 am.png

Click on the Debug icon down left side of project window, and then on gear icon shown with arrow above. Does your launch.json file appear for editing?

 

For what its worth, here's my launch.json configuration that works for me with the latest Illustrator update.

        {
            "type": "extendscript-debug",
            "request": "launch",
            "name": "Debug current file",
            "program": "${file}",
            "targetSpecifier": "illustrator-25.064"
        }

 

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
Enthusiast ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

Thanks! I'm not way past this. I haven't been using with an open folder, but tried what you suggested and found the .vscode launch.json file, which seems to be called for all subfolders. It still won't work with 25.064, and trying to update that line to 25.3.1 it says:

 

Target '' is not running. Select 'yes' to launch

 

Selecting yes yields the below message:

 

TypeError: Cannot read property 'label' of undefined

 

I also tried removing previous versions of Illustrator, but to no avail. No updates are available for my version of VSCode either.

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 ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

LATEST

Here's a basic set up in VSCode (very different to the old ESTK).

 

  1. Create a new folder, called "My General Illustrator Scripting Folder" (Don't actually call it that, but that's the purpose of the folder—general ai scripting.)
  2. In VSCode, choose New Window
  3. Choose Open and select the folder from (1). (Say yes you trust the creator of that folder if asked)
  4. Choose New File and type "alert(app.version);" and save as "test.js" inside the folder from (1). This is just a test file—the code isn't significant.
  5. Click on Run and Debug icon in sidebar (command-shift-D shortcut for me) and click "Create a launch.json file"
  6. Choose "Extendscript Debug" (let me know if this doesn't appear—I've assumed you've already installed it)
  7. Make your launch.json look like this (copy and paste from here if you like) and save it.

 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "extendscript-debug",
            "request": "launch",
            "name": "Debug current file",
            "program": "${file}",
            "targetSpecifier": "illustrator-25.064"
        }
    ]
}

 

Note the targetSpecifier is: major app version number = 25, and architecture = 064 (64 bits). Can be confusing because it isn't a normal major.minor version number.

 

8. Click the tab for the document from (4) test.js and click "Debug current file" at the top of the sidebar under Run and Debug. This should launch Illustrator (or activate it) and show a dialog showing the version number (which isn't the 'targetSpecifier"!).

 

Please see if that all works. If it does, you could decide to store all your "general" or work-in-progress scripts inside the folder from (1) and just use that same launch.json debug configuration every time you are debugging. You can repeat the process to make folders for specific projects, but they will each need their own launch.json debugging configuration.

 

Let me know how you go. 🙂

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