hereによると、私はVSCode拡張:デバッガfor Edgeをインストールしましたが、EdgeでデバッグするためにVSCodeを設定しようとしています。そしてVSCodeでLaunch.jsonファイルは、以下のようなものです:私は上記のオプションを「私のアプリに接続」からVSCodeデバッガを起動してい予期しないサーバーの応答(400)
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "edge",
"request": "launch",
"name": "Launch Program",
"url": "http://localhost:4200",
"webRoot": "${workspaceRoot}/",
"sourceMaps": true
}
,
{
"name": "attach to my-app",
"type": "edge",
"request": "attach",
"port": 9222,
"url": "http://localhost:4200/",
"webRoot": "${workspaceRoot}/",
"diagnosticLogging": true
}
]
}
。 my-appプロジェクトはthis pageのcode hereで見つけることができるAngular2クイックスタートの例です。私はいつも「[debugger-for-chrome]予期しないサーバーの応答(400)」をVSCodeに表示していました。
Angular2/typescriptプロジェクトのデバッグにVSCodeを使用することについてご意見がありましたら、コメントを残してください。
EdgeではなくChromeでデバッグできる場合は、Chromeデバッガの拡張がより安定していると思います。https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome –