【问题标题】:How to include the percent character in the visual studio debugger command line arguments?如何在 Visual Studio 调试器命令行参数中包含百分比字符?
【发布时间】:2023-03-24 09:44:01
【问题描述】:

我想在 Visual Studio 2010 SP1 中调试一个程序,其参数如下:“file-%04d.jpg”。

但是在 Project Properties > Config Properties > Debugging > Command Arguments 中输入这个字符串会改变“% 04",导致argv[1] 被设置为:"file-[some unknown symbol]d.jpg"。

百分比字符似乎被解释为不是我想要的转义序列。这在 2008 年不会发生。

【问题讨论】:

    标签: visual-studio-2010 debugging ide


    【解决方案1】:

    %xx 似乎被解释为 ascii 转义。 所以 %25 应该在参数列表中产生一个真正的 % 字符。

    【讨论】:

    • 非常感谢您!我试图在命令提示符下使用 %% 来逃避它,但它没有用。不过这行得通!
    • 而且这种 VS 行为没有记录,对吧?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-22
    • 2014-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多