Qt Creator - 使用来自文件的输入调试应用程序

mar*_*trz 2 debugging qt-creator

我通常测试我的应用程序

./myapp < test/test01.in
Run Code Online (Sandbox Code Playgroud)

所以在我的运行配置中,我将命令行参数设置为:

< test/test01.in
Run Code Online (Sandbox Code Playgroud)

现在,当我启动调试会话时,我遇到了以下错误:

Debugging complex shell commands in a terminal is currently not supported.
Run Code Online (Sandbox Code Playgroud)

我可以在 QtCreator 中调试我的应用程序,而不必手动输入所有输入/将其直接复制到终端中吗?

小智 5

您需要正确填写 Projects->Run 字段(“可执行文件”、“命令行参数”、“工作目录”)并将“在终端中运行”复选框保留为未选中状态。

之后就可以开始调试了(F5)。