Skip to content

apps/vscode 'Run Extension' pre-launch task calls a nonexistent watch script #1141

Description

@nealrichardson

Bug

The Run Extension launch config in apps/vscode/.vscode/launch.json uses "preLaunchTask": "${defaultBuildTask}". The default build task in apps/vscode/.vscode/tasks.json is:

{ "type": "npm", "script": "watch", "problemMatcher": "$tsc-watch", "isBackground": true, ... }

apps/vscode/package.json has no watch script (it has build, dev, build-test, ...), so F5 from the apps/vscode folder fails at the pre-launch step. The root .vscode/tasks.json has the same npm: watch task, although the root "Run VS Code Extension" config doesn't use it.

Also, $tsc-watch is the wrong problem matcher even if a watch script existed, because the build is esbuild (tsx build.ts), not tsc --watch.

Fix options

  1. Point the default build task at an existing script (e.g. yarn dev, which is tsx build.ts dev), make it non-background, and use problemMatcher: [] or an esbuild matcher. That also needs the other workspaces to be built, so it may have to be turbo run build --filter quarto... from the repo root, like vscode:prepublish does.
  2. Or add a real watch script. Note that the turbo 2 upgrade plan (deps-upgrade-turbo.md) also drops a broken root watch script, so coordinate with that.

Also update the root .vscode/tasks.json for consistency, and check that apps/vscode/CONTRIBUTING.md describes the debug flow correctly.

Found during the dependency-upgrade research.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions