Copy link to clipboard
Copied
I am moving to VSC for ExtendScript development and have a question about the "launch.json". I read that it can be edited to target a specific application when running a script. But I can't find instructions for "How" to do that.
"version": "0.2.0",
"configurations": [
{
"type": "extendscript-debug",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"stopOnEntry": false
},
]
}
The above "launch.json" will run the current file to Illustrator as long as AI has been selected from the "Target Apps" list at the bottom of VSC. Problem is this selection is lost between sessions and I ONLY develop for AI (right now).
Note: There is no "JSON" code option in the "Format Code" feature in this forum.
Hi, use "targetSpecifier". This is what I use for a simple case of "debug the file I'm editing right now":
{
"type": "extendscript-debug",
"request": "launch",
"name": "Debug current file",
"program": "${file}",
"targetSpecifier": "illustrator-24.064"
}
You can find the version of Illustrator by doing app.version, and taking the main version number (24 for me) and adding 0.64 for 64 bit. I haven't done this with many versions, and only on Mac, so I don't know how robust this
...Copy link to clipboard
Copied
Hi, use "targetSpecifier". This is what I use for a simple case of "debug the file I'm editing right now":
{
"type": "extendscript-debug",
"request": "launch",
"name": "Debug current file",
"program": "${file}",
"targetSpecifier": "illustrator-24.064"
}
You can find the version of Illustrator by doing app.version, and taking the main version number (24 for me) and adding 0.64 for 64 bit. I haven't done this with many versions, and only on Mac, so I don't know how robust this method is.
Copy link to clipboard
Copied
Hey, that works! Thanks for the help.
Copy link to clipboard
Copied
You're welcome!