All Articles

VSCode Jest Debug Current Config

Jest

{
  "version": "0.2.0",
  "configurations": \[
    {
      "type": "node",
      "name": "vscode-jest-tests",
      "request": "launch",
      "args": ["${relativeFile}", "--codeCoverage=false"],
      // "args": [
      //   "test",
      //   "lib-name",
      //   "--runInBand=true",
      //   "--codeCoverage=false"
      // ],
      "disableOptimisticBPs": true,
      "cwd": "${workspaceFolder}",
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "program": "${workspaceFolder}/node_modules/jest/bin/jest",
      "windows": {
        "program": "${workspaceFolder}/node_modules/jest-cli/bin/jest"
      },
      "trace": "all"
    }
  ]
}

Chrome

{
  "version": "0.2.0",
  "configurations": [
      {
          "type": "chrome",
          "request": "launch",
          "name": "Launch Chrome against localhost",
          "url": "http://localhost:3001",
          "webRoot": "${workspaceFolder}/src",
          "userDataDir": false
      }
  ]
}

Published Mar 20, 2019

Personal blog. I share frontend development technique and life.