내 launch.json
& tasks.json
를 구성한 다음 내로 돌아가 file.c
녹색 화살표를 클릭합니다.
'첨부 이미지'가 보입니다. 나는 내 디버거 왼쪽하고 액세스 할 수 있도록 확인을 클릭하지만 변수는 존재하지 않으며처럼 내 옵션 step_into
, step_over
나는이 같은 루프에서 자신을 찾을 사라집니다.
다음은 시작 및 작업을위한 JSON입니다.
launch.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": "clang - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "clang build active file"
}
]
}
tasks.json
:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
"/property:GenerateFullPaths=true",
"/t:build",
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"type": "shell",
"label": "clang build active file",
"command": "/usr/bin/clang",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}
코드가 "일시 중지"되지 않은 것 같습니다. 따라서 코드가 실행중인 동안에는 디버거가 활성화되지 않습니다. 중단 점을 설정하고 문제가 해결되는지 확인하십시오.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다