microsoft / vscode-generator-code

Visual Studio Code extension generator
Other
1.3k stars 224 forks source link

$ts-webpack-watch is generated by yo in `tasks.json` but isn't recognised by VsCode #457

Closed geoidesic closed 6 months ago

geoidesic commented 8 months ago

I ran:

npm i -g yo generate-code;
yo code

Which generated this tasks.json file:

// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "watch",
            "problemMatcher": "$ts-webpack-watch",
            "isBackground": true,
            "presentation": {
                "reveal": "never",
                "group": "watchers"
            },
            "group": {
                "kind": "build",
                "isDefault": true
            },
        },
        {
            "type": "npm",
            "script": "watch-tests",
            "problemMatcher": "$tsc-watch",
            "isBackground": true,
            "presentation": {
                "reveal": "never",
                "group": "watchers"
            },
            "group": "build"
        },
        {
            "label": "tasks: watch-tests",
            "dependsOn": [
                "npm: watch",
                "npm: watch-tests"
            ],
            "problemMatcher": []
        }
    ]
}

But VsCode Problems reports:

[{
    "resource": "/Users/blah/blah/.vscode/tasks.json",
    "owner": "_generated_diagnostic_collection_name_#2",
    "code": "1",
    "severity": 4,
    "message": "Unrecognized problem matcher. Is the extension that contributes this problem matcher installed?",
    "startLineNumber": 9,
    "startColumn": 22,
    "endLineNumber": 9,
    "endColumn": 41
}]

When I run "Start Debugging", I get this alert

Screenshot 2024-03-29 at 12 21 49
aeschli commented 6 months ago

You also need to install the recommended extension "amodio.tsl-problem-matcher"