Debugging JS in a webview

Hi,
I have a webview that loads a Javascript and I'm trying to debug it (It works fine in chrome but webview doesnt'). Does anyone have experience using something like jsHybugger with xamarin? Any pointers would be appreciated.
https://www.jshybugger.com

Posts

  • So I've attempted to create a java binding project for this.

    First I had to edit the metadata.xml to include:

    <attr path="/api/package[@name='org.a.a.d.a.d']/class[@name='C']/field[@name='C']" name="managedName">C2</attr> <attr path="/api/package[@name='org.a.a.d.a.d']/class[@name='C']/field[@name='c']" name="managedName">C3</attr> <attr path="/api/package[@name='org.mozilla.javascript']" name="managedName">OrgMozilla</attr>

    And now I'm stuck on the following error
    Error CS0234: The type or namespace nameE' does not exist in the namespace OrgMozilla'. Are you missing an assembly reference? (CS0234) (jsHybugger_xamarin)

    I've importaed the Mozilla Rhino js.jar and set it to be a "EmbeddedReferenceJar" but still no joy. Any tips greatly appreciated.

  • cyflowcyflow DEMember

    I can't help you with the binding problem but show you another option which you can use. If you (can) load the HTML page & scripts (for the webview) from a remote host, then you can use jsHybugger app (Browser mode). In this scenario the webview load the page/scripts over the jsHybugger app from the webserver. You can debug your app without creating a java binding.

  • You should be able to create a working binding by using the attached metadata.xml.

  • Enel-PhiEnel-Phi CNMember

    @Alexander Genne I also want to use Mozilla Rhino JavaScript Engine in my Xamarin.Android project. But while I binding the JAR file, VS2015 post a lot of errors. I saw you had created a metadata.xml, can you share it to me?
    My email is [email protected]
    Thank you.

  • Enel-PhiEnel-Phi CNMember

    @IsaacJeppsen said:
    So I've attempted to create a java binding project for this.

    First I had to edit the metadata.xml to include:

    <attr path="/api/package[@name='org.a.a.d.a.d']/class[@name='C']/field[@name='C']" name="managedName">C2</attr> <attr path="/api/package[@name='org.a.a.d.a.d']/class[@name='C']/field[@name='c']" name="managedName">C3</attr> <attr path="/api/package[@name='org.mozilla.javascript']" name="managedName">OrgMozilla</attr>

    And now I'm stuck on the following error
    Error CS0234: The type or namespace nameE' does not exist in the namespace OrgMozilla'. Are you missing an assembly reference? (CS0234) (jsHybugger_xamarin)

    I've importaed the Mozilla Rhino js.jar and set it to be a "EmbeddedReferenceJar" but still no joy. Any tips greatly appreciated.

    I have same question. Do you fix it?

  • Enel-PhiEnel-Phi CNMember

    @AlexanderGenne said:
    You should be able to create a working binding by using the attached metadata.xml.

    I also want to use Mozilla Rhino JavaScript Engine in my Xamarin.Android project. But while I binding the JAR file, VS2015 post a lot of errors. I saw you had created a metadata.xml, can you share it to me?
    My email is [email protected]
    Thank you.

Sign In or Register to comment.