CLion-命令行程序参数

问题描述:

当我分配给运行/调试配置时,有人可以告诉我JetBrains CLion怎么了吗-程序参数类似 aaa bbb,然后打印出来:

Can anyone tell me what wrong with JetBrains CLion, when I assign to Run/Debug Configurations - Program arguments something like "aaa bbb" and then print it:

printf("%s\n", argv[1]);

我刚得到 aaa,当它必须为 aaa bbb时,因为它们用双引号引起来。

I just got "aaa", when it must be "aaa bbb" because they are in double quotes.

图片-这就是我得到的

编辑:在其他IDE(Dev C ++,Codelite)中进行了测试,并且可以工作。只有Clion没有:(只是简单的事情,无法弄清楚...

tested in other IDEs (Dev C++, Codelite) and it works. Only Clion does not :( Just simple thing and can not figure it out...

这似乎是一个错误CLion。对我来说,它仅在我启动应用程序而不对其进行调试时发生(运行>运行测试)。当我在调试模式下运行(运行>调试测试)时,它运行正常并显示整个字符串。

This appears to be a bug in CLion. For me, it only happens when I start the application without debugging it (Run > Run 'Test'). When I start in debug mode (Run > Debug 'Test'), it works fine and displays the whole string.

我创建了 JetBrains的问题。一旦收到他们的回复,我会立即更新此答案。

I've created an issue with JetBrains. I'll update this answer as soon as I hear back from them.