尽管设置了选项,.NET 框架源代码单步执行仍无法正常工作
我启用了这些选项,如以下屏幕截图所示:
我还有 System.Windows.Forms。 dll
module selected:
但它会跳过代码。具体来说,我在 ListBox
的子类中包含此代码:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
return base.ProcessCmdKey(ref msg, keyData);
}
我尝试在那里设置一个断点,然后使用 F11 单步执行此操作,但它只是单步执行。
要让它发挥作用还缺少什么?
I have these options enabled, as shown in this screenshot:
I also have the System.Windows.Forms.dll
module selected:
Yet it steps over the code. Specifically, I have this code in a subclass of ListBox
:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
return base.ProcessCmdKey(ref msg, keyData);
}
I tried to set a breakpoint there and then step into this with F11, but it just steps over.
What is missing to get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
他们没有发布 VS2010 SP1 附带的 .NET 4.0 最新补丁的源代码,因此如果您安装了该补丁,它将无法找到正确的源文件,从而无法显示它。我的行为也是如此。回滚更新可以解决问题,但我无法使用 SP1 附带的好东西。
如果您选择打印诊断消息的选项,您将收到在服务器上找不到源的警告。您可以从 Referencesource.microsoft.com 下载 RTM 源代码,然后手动浏览源代码。
They didn't release the source code for the latest patch for .NET 4.0 that comes with VS2010 SP1 so if you have that installed, it won't be able to find the right source files thus not be able to display it. That's the exact behavior with me also. Rolling back the update solves the problem but then I don't get to use the goodies that come with SP1.
If you select the option to print diagnostic messages, you'll get the warning that sources cannot be found at the server. You can download the RTM source from referencesource.microsoft.com and manually browse the sources otherwise.
Microsoft Connect。
There is an bug registered on Microsoft Connect for this if you want to upvote it.