LoginSignup
2
3

More than 3 years have passed since last update.

Visual Studio CodeでChromeを起動してNode.jsをデバッグする設定

Posted at

すぐ忘れるのでメモ

  1. 拡張機能より「Debugger for Chrome」をインストール
    https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome

  2. .vscode/launch.jsonに以下を記述

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Chrome",
            "request": "launch",
            "type": "pwa-chrome",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}"
        },
        {
            "name": "Run npm start",
            "command": "npm start",
            "request": "launch",
            "type": "node-terminal"
        },
    ],
    "compounds": [
        {
            "name": "Launch Chrome & npm start",
            "configurations": [
                "Launch Chrome",
                "Run npm start"
            ]
        }
    ]
}
  1. [Launch Chrome & npm start]をデバッグ実行
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3