natvis - 将tabulator添加到输出

时间:2016-12-19 09:35:02

标签: visual-studio-2015 natvis

有没有办法用制表符或其他通常转义的符号格式化监视窗口的最终输出值字符串?

我试过了:

<Type Name="MyVector">
    <DisplayString Optional="true">x={myVal.x}, y={myVal.y}, z={myVal.z}</DisplayString>
</Type>

结果是:

enter image description here

我想:

enter image description here

到目前为止我已尝试过:

 {\t}
 \t
 {{\t}}

有时事情隐藏在MSDN DocMSDN Code Blog中。但在这种情况下,我找不到解决方案。

1 个答案:

答案 0 :(得分:1)

I've wanted to be able to do this for years, but no, I do not believe you can. Given that the font used in the autos/locals/watch windows are not fixed-width (and can not be changed, as far as I can tell), you'd still have trouble trying to line stuff up, even if you could add tabs.