Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/163.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何构建和运行c++;Visual Studio代码中的应用程序版本_C++_Visual Studio Code_Release_Launch - Fatal编程技术网

C++ 如何构建和运行c++;Visual Studio代码中的应用程序版本

C++ 如何构建和运行c++;Visual Studio代码中的应用程序版本,c++,visual-studio-code,release,launch,C++,Visual Studio Code,Release,Launch,似乎启动配置必须使用调试器运行。我找不到不使用调试器的启动类型,也找不到允许多个运行配置的vscode插件 My launch.json如下所示: { "name": "C++ Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/a.out", "args": ["arg1", "arg2"], "environment": [{"name": "squid", "value": "clam"}

似乎启动配置必须使用调试器运行。我找不到不使用调试器的启动类型,也找不到允许多个运行配置的vscode插件

My launch.json如下所示:

{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/a.out",
"args": ["arg1", "arg2"],
"environment": [{"name": "squid", "value": "clam"}],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal"
 }
如何在发布模式下构建和运行应用程序


谢谢。

你找到解决方案了吗?@AkmalSalikhov没有,我刚刚放弃使用VS代码。我现在使用Qt Creator。我今天在一个cmake项目中遇到了这个问题。在底部的工具栏上,如果切换到Release,则“Debug”按钮将启动Release版本的exe,而不是在本例中根本不存在的Debug.exe。找到解决方案了吗?@AkmalSalikhov没有,我刚刚放弃使用VS代码。我现在使用Qt Creator。我今天在一个cmake项目中遇到了这个问题。在底部工具栏上,如果切换到Release,则“Debug”按钮将启动Release版本的exe,而不是在本例中根本不存在的Debug.exe。