0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【メモ】Visual Studio CodeでのJavaScriptのデバッグ

Posted at

毎度忘れるのでメモ

  1. 事前に拡張機能のLive Serverをインストールする。
  2. index.htmlとscript.jsのHTML/JavaScriptのニコイチを用意する。
  3. script.jsのコードのどこかにF9でブレークポイントを設置
  4. index.htmlをF5でデバッグする
  5. launch.jsonが起動するので、以下のように設定する。
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome Local Debug",
            "url": "http://localhost:5500/index.html",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

5500のポートはlive Serverのポート

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?