restore-terminals-vscode icon indicating copy to clipboard operation
restore-terminals-vscode copied to clipboard

run .vscode/restore-terminals.json for each multi-root workspaces

Open rrlopez opened this issue 2 years ago • 1 comments

Hi, I'm looking for a way to run each .vscode/restore-terminals.json for a workspace that has more than one root directory. How are people solving this currently?

rrlopez avatar Jan 03 '23 14:01 rrlopez

Hi, i haved the same problem with restore-terminals so i try another solution with vscode tasks and it works.

First, create tasks.json file on each .vscode root directory of your workspace

Describe your tasks and add the property runOptions like in this example :

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "LOG",
            "type": "shell",
            "command": "docker-compose up",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "API CT",
            "type": "shell",
            "command": "docker-compose exec api bash",
            "runOptions": {
                "runOn": "folderOpen",
            }
        }
    ]
}

I hope it helps

kernox avatar Jan 05 '23 11:01 kernox