1. 在VS2022 切换到CMake视图 ,右键,添加调试配置:
在launch.vs.json文件中:
写入以下配置:
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "hq.exe",
"name": "haha",
"args": [
"aaa",
"bbb"
],
"env": {
"PATH": "F:\\PCL 1.12.0\\3rdParty\\VTK\\bin"
}
}
]
}
其中 "name": "haha" 为 调试名,