반응형
비쥬얼스튜디오 코드에서 JavaScript 코드를 디버깅하는 방법에 대해서 알아보자.
1. 우선 사이드바에 있는 'Run and Debug'메뉴를 누른다. 없다면 단축키 Ctrl+ Shift + D
2. 아래의 'Run and Debug' 버튼을 클릭한다.
3. VS Code 화면의 중앙위에서 chrome 을 선택한다.
이때 .vscode > launch.json 화면이 보인다면 아래와 같이 입력하면 된다.
url은 각자의 상황에 맞게 입력하면 된다.
{
// 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": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}

반응형
'Tools' 카테고리의 다른 글
[eclipse 오류 해결]!ENTRY org.eclipse.e4.ui.workbench (0) | 2023.06.28 |
---|---|
[VS Code] 코드정렬 (0) | 2023.01.04 |
[VS Code][Git] 작성자 이름 변경 (0) | 2023.01.04 |
[VS Code] 디버깅 오류 crbug/1173575, non-JS module files deprecated. 해결 (0) | 2023.01.03 |
[VS Code 단축키]Visual Studio Code 화면 분할 단축키 (0) | 2022.11.04 |