Debugging in Windows Phone 7 emulator browser?

I am trying to test my home JavaScript framework in any number of browsers that I can find. Today I realized that on my Windows computer I can install the Windows Phone 7 developer tools and test in the emulator.

I did this, and unfortunately it did not work, but I have no idea how to say what is going wrong. I don’t know how to fix it, because within the framework there are 1000 things that can go wrong, and all I have is to guess.

Does anyone know how to debug emulator browser, or am I just stuck?

+5
source share
3 answers

JS . Fiddler . IE WP7 Internet Explorer 7 ( , IE8). IE7, WP7 ( WP7 ). Mango IE 9. IE 9, .

+2

Javascript, Javascript :

window.external.notify("Some debug message");

WebBrowser ScriptNotify XAML, #:

private static void ScriptNotified(object sender, NotifyEventArgs e)
{
    Debug.WriteLine("Script notified: " + e.Value);
}
+4

... Script MainPage.xaml.cs

public partial class MainPage : PhoneApplicationPage
    {

.

snipit:

  // provide our own console if it does not exist, huge dev aid!
  if(typeof window.console == "undefined")
  {
  window.console = {log:function(str){window.external.Notify(str);}};
  }

      window.onerror=function(e, url, lineNumber)
      {
          console.log("ERROR! : " +url + "(" + lineNumber + ") : " + JSON.stringify(e));
      };

  console.log("Installed console ! ");

: http://sim4all.com/blogging/?p=266.. , , onerror, nr .

this implements a Console.log object and an onerror message .. This is really useful ...

All this goat operation is only necessary for the Cordoba layer to be loaded. Then Cordoba takes better care of this.

Hope this helps. Kim

+4
source

All Articles