简体   繁体   中英

VSCode debugs an old file instead of current one

Setting up the debugger was already painful but I was able to do it in the end. I wanted to organize my files properly so I made some subfolders and then when I tried to debug any program in my subfolder, it would debug an older file from the main folder that I had debugged sometime before.

Heres my launch.json file这是我的 launch.json 文件

You have to change the program that you're debugging, currently you have that set to a.exe to debug another file change this line:

“program”: “${workspaceFolder}/a.exe”,

to this,

“program”: “${workspaceFolder}/path/to/debug/test.exe”,

Alternatively, you can add another configuration (ie copy-and-paste your current configuration changing the line from above and the name)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM