如图
改相应的launch.json
至于D盘test.exe是因为有中文路径
"program":"C:\\Windows\\System32\\cmd.exe",
"args": ["/c","${fileDirname}/${fileBasenameNoExtension}.exe","&","pause"],
标签:exe,程序运行,vscode,fileDirname,json,D盘
From: https://www.cnblogs.com/qbning/p/16631235.html