安裝 Debugger for Chrome(PS.因為我已經安裝過了所以只有解除安裝)
按下F5選擇Chrome後會產生一個檔案launch.json
{
"version": "0.2.0",
"configurations": [{
"name": "Launch Chrome against localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceRoot}/*"
}
}]
}
按下ctrl + P 搜尋 launch.json 開啟後將以上資訊取帶原本內容(PS.貼上後可以用[shift+alt+F]會自動排版 )
接下來執行 ng serve(保持執行)
執行ng serve後就可以按下F5並且成功進入中斷點囉~
沒有留言:
張貼留言