Visual Studio 2008 的 Silverlight 2 调试问题
我在使用 Visual Studio 2008 SP 1 调试简单的 Silverlight 2 应用程序时遇到问题。有时,我可以调试 Page.cs 代码,有时则不能。 我有一个 Web 应用程序,它托管 silverlight .xap 文件。
从 ClientBin 目录中删除 .xap 文件并重建工作时断时续,但不可靠。
我烦了。
I have problem to debug a simple Silverlight 2 application with Visual Studio 2008 SP 1. Sometimes, I could debug the Page.cs code and sometimes not. I have a web application, which hosts the silverlight .xap files.
Deleting the .xap files from ClientBin Directory and rebuilding works sporadic but not reliable.
I am frustrated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我听从了这里的建议并切换到 Chrome。 正如 Fayssal 所说,这是唯一提供 silverlight 调试的进程。
我还从我的电脑上卸载了所有 silveright(SDK、VS 工具),只安装了 VS2008 Silverlight 工具。 请参阅下面我的版本。
Chrome 还会显示一个对话框,告诉我我使用的是旧版本的 Silverlight。 这导致我使用的 silverlight 检测 javascript 出现问题。 使用命令行 arg --allow-outdated-plugins 将其关闭(更多信息请参见此处)。
..你可能想要 --disable-hang-monitor
I followed the advice on here and switched to Chrome. As Fayssal says it's the only process offering silverlight debugging.
I also uninstalled everything silveright off my PC (SDK, VS tools), and just installed the VS2008 Silverlight tools. See my versions here below.
Chrome also displays a dialog telling me that I'm on an old version of Silverlight. Which causes me problems with the silverlight detecting javascript I use. Turn that off with the command line arg --allow-outdated-plugins (more here).
..and you'll probably want to --disable-hang-monitor
我发现自己有一个非常愚蠢的问题:我选择了 Chrome 作为我的标准浏览器。 这不是开发 silverlight 应用程序的理想浏览器。
I found one very silly issue from myself: I have chosen Chrome as my standard browser. This is not the ideal browser, to develop silverlight apps.
我也经常看到。
对我来说总是有效的方法是转到 Web 项目属性页面,选择“Silverlight 应用程序”选项卡,删除应用程序并再次添加。 这似乎有 100% 的帮助(丑陋的解决方法,但是......)
I see it frequently, too.
What works always for me is to go to Web project property page, tab 'Silverlight Applications', delete the app and add it again. That seems to help 100% (ugly workaround, but...)
我使用 Chrome 来调试 Silverlight 应用程序,没有出现任何问题。
唯一的技巧是 Visual Studio 在启动应用程序时将自身附加到错误的 Chrome 进程。 通过在 Visual Studio 中选择“工具”->“附加到进程”->“启动应用程序”后,可以轻松解决此问题。 (选择在其类型列中指定了“Silverlight”的 Chrome 进程,对我来说是“Silverlight,x86”)-> 附加
在 Chrome 中刷新应用程序应该会在 Visual Studio 中命中断点。
I use Chrome for debugging my Silverlight application without problems.
The only trick is that visual studio attaches itself to the wrong Chrome process when lauching the application. This could be solved easily after launching the application by choosing in visual studio Tools->Attach to Process -> (select the Chrome process that has "Silverlight" specified in its Type column, for me it is "Silverlight, x86")->Attach
Refreshing the application in Chrome should make the breakpoints hit in Visual Studio.