cristinafsanz
9/13/2019 - 9:13 AM

Debug with Visual Studio Code and scripts package.json

Debug with Visual Studio Code and scripts package.json

Script package.json

 "scripts": {
  "a11y-check-local:debug": "node --inspect-brk pa11y/index.js 'http://localhost:3000'",
}

Visual Studio Code

  • Click on Debug icon on the left sidebar

  • Add configuration

  • launch.json // TODO

    {
      "version": "0.2.0",
      "configurations": [
          {
              "type": "node",
              "request": "launch",
              "name": "pa11y test",
              "cwd": "${workspaceFolder}",
              "runtimeExecutable": "npm",
              "runtimeArgs": [
                "run-script",
                "a11y-check-local:debug"
              ],
          }
      ]
    

}