일부 오류로 인해 localhost를 열 수없고 VS 코드에서 TypeScript 파일을 디버깅 할 수 없습니다. 나는 표적을 to "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--remote-debugging-port=9222"
크롬 속성에 설정했습니다. [debugger-for-chrome] Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222
으로 오류가 발생했습니다. chrome.exe
프로세스를 모두 종료 한 후 오류에 대한 다음 이미지를 참조하십시오. 누군가이 문제를 해결하도록 도와 줄 수 있습니까? 미리 감사드립니다.TypeScript로 디버깅 할 수 없습니다 - VS 코드
.vscode/launch.json :
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch index.html with sourcemaps",
"type": "chrome",
"request": "launch",
"file": "${workspaceRoot}/index.html",
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
},
{
"name": "Launch localhost with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
},
{
"name": "Attach with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
}
]
}
tsconfig.json :
{
"compilerOptions": {
"target": "es5",
"sourceMap": true
}
}
응용 프로그램/app.ts :
var x = 1;
console.log(x); //made debugger here in VS Code
index.html을 : 직접 질문이지만 대답
<!doctype html>
<html>
<body>
<h3>TypeScript Debugger</h3>
<script src="app/app.js"></script>
</body>
</html>
당신이 알고, 당신이, 텍스트를 그 텍스트 파일을 게시 할 수 원격 디버깅 플래그 –
다시 시작하려고 다음 작업 관리자에서 모든'chrome.exe' 프로세스를 죽이고 시도하고 : 이 스크린 샷을 참조하십시오? 누군가 자신의 상황을 재현하려면 해당 코드를 모두 다시 입력해야합니다. –
@Gideon 모든 chrome.exe 프로세스를 죽이려고했습니다. 이제 방금 편집 한이 게시물에서 참조 할 수있는 리소스 : net :: ERR_CONNECTION_REFUSED (http : // localhost : 3000 /) "오류가 발생했습니다. –