Skip to main content
deckarduk
Inspiring
September 20, 2023
Answered

VSC launch.json question...

  • September 20, 2023
  • 2 replies
  • 1309 views

Hi Everyone,

Please can someone point me in the right direction.

I'm currently doing some script work for InDesign.

I have placed the launch.json in the same folder as the jsx file and it looks like this...

 

{
    // 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": "attach",
            "name": "Attach Indesign",
            "hostAppSpecifier": "indesign-18.064",
            "engineName": "main",
            "hiddenTypes": [
                "builtin",
            ],
        },
        {
            "type": "extendscript-debug",
            "request": "launch",
            "name": "Attach Indesign",
            "hostAppSpecifier": "indesign-18.064",
            "engineName": "main",
            "hiddenTypes": [
                "builtin",
            ],
        }
    ]
    
}

 

When come to execute the script VSC still asks for launch or attach.

I'm then asked to select the Host Application and after that the Extendscript Engine.

 

Is my launch.json set up incorrect?

 

Thanks.

 

This topic has been closed for replies.
Correct answer Manan Joshi

Probably the issue is with the location of your launch.json file. It is supposed to be present in the .vscode folder next to the jsx file.

Check the "Launch configurations" section in the following article for more details

https://code.visualstudio.com/docs/editor/debugging

-Manan

2 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
September 21, 2023

Probably the issue is with the location of your launch.json file. It is supposed to be present in the .vscode folder next to the jsx file.

Check the "Launch configurations" section in the following article for more details

https://code.visualstudio.com/docs/editor/debugging

-Manan

-Manan
deckarduk
deckardukAuthor
Inspiring
September 21, 2023

Hi Manan,

Thank you for the help, that's sorted it.

I've found clicking on the cog, at the top of the 'RUN AND DEBUG' tab, takes me to the correct location of the launch.json file.

 

Thanks again for the help 🙂

m1b
Community Expert
Community Expert
September 20, 2023

Hi @deckarduk, your launch.json seems fine. Here's mine:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "extendscript-debug",
            "request": "attach",
            "name": "Start debugger—IND",
            "hostAppSpecifier": "indesign",
            "engineName": "main",
        },
    ]
}

I never use "launch" so it just has the one configuration. Using the hiddenTypes: builtin is a good idea, so that shouldn't be a problem.

 

Do you have multiple installations of Indesign 18 installed? That will cause the behaviour you see.

- Mark

deckarduk
deckardukAuthor
Inspiring
September 21, 2023

Hi @m1b, thanks for the help with my query.

I'm 99% sure I don't have multiple installations of InDesign 18 (2023) installed.

I'll try the launch.json code you have and see if that sorts it.

 

Thanks once again Mark.