我在通過 html vscode 除錯連接到 chrome 時遇到問題。每次我進入運行選單并單擊“開始除錯”或“不除錯運行”時,谷歌瀏覽器都會打開并顯示新標簽,而不是我正在除錯的檔案。回到vscode,發現呼叫堆疊是空的。我也嘗試過使用launch.json檔案。我以前沒有遇到過這個問題。我能夠在沒有 chrome 除錯器擴展(現已棄用)的情況下使用 chrome 除錯 html。我不知道為什么我現在遇到這些問題。請問有人可以幫我解決這個問題嗎?謝謝。
注意:我最近卸載并安裝了最新版本的 chrome,還安裝了 chrome dev。我不知道這是否與這個問題有關。
uj5u.com熱心網友回復:
打開 html 檔案,然后運行->“啟動 Chrome”。
lauch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003
},
{
"type": "chrome",
"request": "attach",
"name": "Attach Chrome",
"url": "http://localhost/${workspaceFolderBasename}/${relativeFile}",
"webRoot": "${workspaceFolder}",
"port": 80,
"userDataDir": "${workspaceFolder}/.vscode/chrome",
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost/${workspaceFolderBasename}/${relativeFile}",
"webRoot": "${workspaceFolder}",
"userDataDir": "${workspaceFolder}/.vscode/chrome",
},
]
}
uj5u.com熱心網友回復:
不是您問題的直接答案,但您可以嘗試使用括號 - https://brackets.io/
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/413047.html
標籤:
上一篇:java中Random類的使用
