Logic behind (enabling Silverlight debugging disables Javascript debugging)?
As you know, we can't enable both Silverlight and Javascript debugging, Is there any logic behind this?
and since Silverlight can call Javascript and Javascript ca开发者_StackOverflown call Silverlight, what if we wanted to debug both in a row?The only logic behind it is that just debugging Silverlight or Javascript alone are both very complex propositions. There are a zillion differences between debugging a much older COM Based scripting engine that IE runs and the latest IL based CLR. Hence the product of complexity that being able to debug both at the same time results in a cost far exceeding benefits.
Bottom line is you can't debug both. You could create a mock Silverlight app which has all the Scriptable contract of the real silverlight app and mimics its behaviour. This allows you to test the Javascript.
You can then switch to debugging the real Silverlight app.
Alternatively you need to resort Alerts or MessageBox.Shows to help view the non-debugging side or your operations.
One other possibility is that other browsers contain their own debugging tools. It may be possible to debug both using one of those.
精彩评论