3

ここに画像の説明を入力

アップデートの1つが突然機能しなくなった後。現在、Chrome 開発者ツールを使用してデバッグしています。

ng serve はうまく機能し、アプリは完全に動作しています。

しかし、もう一度 VSCode でデバッグしたい..上記と同じ問題が発生するいくつかの構成を試しました。2.

{
"version": "0.2.0",
"configurations": [

  {
    "name": "ng serve",
    "type": "chrome",
    "request": "launch",
    "url": "http://localhost:4200/#",
    "webRoot": "${workspaceFolder}",
    "sourceMapPathOverrides": {
      "webpack:/./*": "${webRoot}/*",
      "webpack:/src/*": "${webRoot}/src/*",
      "webpack:/*": "*",
      "webpack:/./~/*": "${webRoot}/node_modules/*"
    }
  },
  {
    "name": "ng test",
    "type": "chrome",
    "request": "launch",
    "url": "http://localhost:9876/debug.html",
    "webRoot": "${workspaceFolder}"
  },
  {
    "name": "ng e2e",
    "type": "node",
    "request": "launch",
    "program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
    "protocol": "inspector",
    "args": ["${workspaceFolder}/protractor.conf.js"]
  }
]

}

2.

// {
//    // Use IntelliSense to find out which attributes exist for C# debugging
//    // Use hover for the description of the existing attributes
//    // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
//    "version": "0.2.0",
//    "configurations": [  
//        {
//            "name": "Launch Chrome with ng serve",
//            "type": "chrome",
//            "request": "launch",
//            "url": "http://localhost:4200",
//            "webRoot": "${workspaceRoot}",
//            "sourceMapPathOverrides": {
//                "webRoot": "${workspaceRoot}",
//                "webpack:/*": "${workspaceRoot}/*"
//            }
//        },
//        {
//            "type": "chrome",
//            "request": "attach",
//            "name": "Attach to Chrome",
//            "port": 9222,
//            "webRoot": "${workspaceFolder}"
//        }

//     ,]
// }
{
  "version": "0.2.0",
  "configurations": [{
      "name": "Launch Chrome",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:4200",
      "webRoot": "${workspaceFolder}",
      "sourceMapPathOverrides": {
        "webRoot": "${workspaceRoot}",
        "webpack:/*": "${workspaceRoot}/*"
      }
    },
    {
      "name": "Attach Chrome",
      "type": "chrome",
      "request": "attach",
      "url": "http://localhost:4200",
      "port": 9222,
      "webRoot": "${workspaceFolder}"
    },
    {
      "name": "Launch Chrome (Test)",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:9876/debug.html",
      "webRoot": "${workspaceFolder}"
    },
    {
      "name": "Launch Chrome (E2E)",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
      "protocol": "inspector",
      "args": ["${workspaceFolder}/protractor.conf.js"]
    }
  ]
}

Chrome Visual Studio Team Services のデバッガーを除くすべての拡張機能を無効にしました

ポート 4200 が使用されていません

netstat -a -n -o

VSCode を介して launch.json を変更し、デバッグ機能を復元するにはどうすればよいですか?

4

1 に答える 1