microsoft / microsoft/vscode-js-debug

How do I configure a wait before running the launch command?

Open
#2,035 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

I have a straightforward launch command: npm run dev but my terminal doesn't start fast enough for the debugger, so it executes the command before my shell is ready. This means I always have to manually run the command after to get it to work. Is there a way I can setup the launch task to wait like 500ms or something before running the command?

Launch.json:

{
  "configurations": [
  {
      "name": "Next.js: debug full stack",
      "type": "node-terminal",
      "request": "launch",
      "command": "npm run dev",
      "internalConsoleOptions": "openOnSessionStart",
      "serverReadyAction": {
        "pattern": "- Local:.+(https?://.+)",
        "uriFormat": "%s",
        "action": "debugWithChrome",
      },
    }
  ]
}

Terminal output:

npm run dev
 ~/W/p//boarder  BETA-138-Occ…cle-presence *1 !8 ?1 
❯              

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the launch.json configuration and the node-terminal launch path that runs npm run dev; determine whether command startup timing is configurable there. Done means establishing a clear supported behavior for delaying the launch command and documenting or validating the requested 500ms-style use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.