查看调试监视中的子字符串
在调试会话期间在“监视”窗口中查看字符串时是否可以看到字符串的子字符串?
Is it possible to see a substring of a string when looking a string in the Watch window during a debugging session?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的 - 只是观看
或其他什么。
当你尝试这个时发生了什么?
编辑:“不起作用”并不是对发生的事情的真正描述。我刚刚在VS2008中亲自尝试过,效果很好。当您迈出一步时,该值会变灰,但值框的右侧有一个小“刷新”按钮...当您单击该按钮时,它将重新计算表达式。
如果您没有遇到这种情况,请描述您正在发生的情况。
Yes - just watch
or whatever.
What happened when you tried this?
EDIT: "doesn't work" isn't really a description of what happened. I've just tried this myself in VS2008, and it worked fine. The value greys out when you step, but there's a little "refresh" button on the right hand side of the value box... when you click that, it will re-evaluate the expression.
If that's not happening for you, please describe what is happening for you.
我倾向于使用 立即窗口这类事情,但正如 Jon Skeet 所说,您也可以直接在监视窗口中执行此操作。
I tend to use the Immediate Window for this sort of thing, but as Jon Skeet has said you can also do it directly in the Watch Window.
当然,只需放入一个新的监视条目,其中包含您想要查看的子字符串:-
sure, just put in a new watch entry with the substring you want to see :-