Create launch configuration not only for workspace instead for that specific language

39 views Asked by At

How to create a launch configuration that can be used on other projects, not only for current workspace?

I have my launch config for running JavaFX projects. But I want it to be used for my other JavaFX projects, it's only on the launch.json on the current workspace.

"configurations": [
        {
            "type": "java",
            "name": "Launch JavaFX",
            "request": "launch",
            "vmArgs": "--module-path %PATH_TO_FX% --add-modules javafx.controls,javafx.fxml",
            "mainClass": "App"
        },
]
1

There are 1 answers

0
snich On BEST ANSWER

I don't know what's wrong with me, but after posting this question I found the solution right away.

You simply add the configurations on your VS Code's settings.json.

    "launch": {
        "configurations": [
            {
                "type": "java",
                "name": "Launch JavaFX",
                "request": "launch",
                "vmArgs": "--module-path %PATH_TO_FX% --add-modules javafx.controls,javafx.fxml",
                "mainClass": "App"
            },

        ],
        "compounds": []
    }