如何调试嵌入在WebBrowser控件中的Silverlight?

时间:2021-11-11 23:39:17

I have a WPF application with a WebBrowser Control. The WebBrowser loads a page with a Silverlight application. Is it possible to debug both applications together? How do I have to start the Silverlight application?

我有一个带WebBrowser控件的WPF应用程序。 WebBrowser加载具有Silverlight应用程序的页面。是否可以将两个应用程序一起调试?如何启动Silverlight应用程序?

Edit: If I start the Silverlight solution, I can debug the code "in the Browser-Window". If I start the WPF solution I can debug the WPF Part but I can not debug the Silverlight in the "WPF-Window" - the code works but the breakpoints are ignored.

编辑:如果我启动Silverlight解决方案,我可以在“浏览器窗口”中调试代码。如果我启动WPF解决方案,我可以调试WPF部件,但我不能在“WPF窗口”中调试Silverlight - 代码可以工作,但忽略了断点。

1 个解决方案

#1


0  

You can debug both applications - the WPF WebBrowser control just needs to be pointed to localhost (via Webbrowser.Navigate) so you can easily attach to the SL app host process (IIS, IIS Express, etc. - or enable remote debugging support on your web server hosting the XAP). For WPF, just use F5 to auto-attach it.

您可以调试这两个应用程序 - 只需要将WPF WebBrowser控件指向localhost(通过Webbrowser.Navigate),这样您就可以轻松连接到SL应用程序主机进程(IIS,IIS Express等) - 或者启用对您的远程调试支持托管XAP的Web服务器)。对于WPF,只需使用F5自动附加它。

#1


0  

You can debug both applications - the WPF WebBrowser control just needs to be pointed to localhost (via Webbrowser.Navigate) so you can easily attach to the SL app host process (IIS, IIS Express, etc. - or enable remote debugging support on your web server hosting the XAP). For WPF, just use F5 to auto-attach it.

您可以调试这两个应用程序 - 只需要将WPF WebBrowser控件指向localhost(通过Webbrowser.Navigate),这样您就可以轻松连接到SL应用程序主机进程(IIS,IIS Express等) - 或者启用对您的远程调试支持托管XAP的Web服务器)。对于WPF,只需使用F5自动附加它。