Highlighted

Setup VSCode to debug for both Illustrator and Photoshop?

Adobe Community Professional ,
Oct 09, 2020

Copy link to clipboard

Copied

Until now I've only used VSCode with Illustrator. Now I'd like to debug ExtendScript for Photoshop in VSCode as well. If I simply choose "Photoshop" as the target and debug VSCode automatically tries to run the script in Illustrator. I've read I need to edit the "Launch.json" to make a "compound" section for "multi-target debugging". Does someone know how to do that?

 

This is the VSCode documentation. I don't make much sense of it:
https://code.visualstudio.com/Docs/editor/debugging#_multitarget-debugging

TOPICS
Scripting

Views

43

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

Setup VSCode to debug for both Illustrator and Photoshop?

Adobe Community Professional ,
Oct 09, 2020

Copy link to clipboard

Copied

Until now I've only used VSCode with Illustrator. Now I'd like to debug ExtendScript for Photoshop in VSCode as well. If I simply choose "Photoshop" as the target and debug VSCode automatically tries to run the script in Illustrator. I've read I need to edit the "Launch.json" to make a "compound" section for "multi-target debugging". Does someone know how to do that?

 

This is the VSCode documentation. I don't make much sense of it:
https://code.visualstudio.com/Docs/editor/debugging#_multitarget-debugging

TOPICS
Scripting

Views

44

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
Oct 09, 2020 1
m1b LATEST
Contributor ,
Oct 09, 2020

Copy link to clipboard

Copied

Hi, do you need to debug Photoshop and Illustrator at the same time? If so, I don't know how to do that, so we'll wait for someone more knowledgable. 

 

But in the meantime, if you just want to debug Photoshop by itself, in your launch.json file, add this configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "extendscript-debug",
            "request": "launch",
            "name": "Debug current file in PS",
            "program": "${file}",
            "targetSpecifier": "photoshop-140.064"
        }
    ]
}

 

As you can see, it's the "targetSpecifier" property that tells the debugger which app to target. You can find the version of Illustrator by doing app.version, and taking the main version number (140 for me) and adding 0.64 for 64 bit.

 

Note that you sometimes it might be better to create a new workspace for Photoshop scripting vs Illustrator scripting. It's up to how you work. With large projects you'd make a workspace for each job.

 

Mark

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 09, 2020 1