简体   繁体   中英

How can I debug Javascript in embebed browser in Window?

I need to debug Javascript (Jquery) sources in embedded browser in Windows 7 and XP, when I working with the browser in the Sketchup. I tried with console.log, but it doesn't helps me because brakes the layout from the app. Anyone have a solution?

In Windows Try debug javascript with Charles Web Debugging Proxy www.charlesproxy.com

To enable the Web Inspector panel in WebDialog on Mac OSX...

  1. Go to ~/Library/Preferences/com.xxx.yourapp.plist
  2. Open the file with the Property List Editor.app(default) or other
  3. Click on the add [+] icon
  4. new item name "WebKitDeveloperExtras", then tab
  5. set type to boolean, then tab
  6. check box, sets this value to true
  7. open your app, open a WebDialog, right click in a void and select "Inspect element" to open Inspector

There's a checkbox in the Internet Explorer options that might help:

Internet Options > Advanced > Browsing

  • Disable script debugging (Internet Explorer)
  • Disable script debugging (Other)

The "Other" will affect embedded webcontrols. If you uncheck that you should get error messages popping up when they occur in the SketchUp WebDialog.

It is possible to hook up debuggers as well, I don't remember exactly how it was right now, but I found this article which sounds very familiar. I think that should work: http://blogs.perl.org/users/mark_leighton_fisher/2011/09/debugging-javascript-in-a-webbrowser-control-from-vs2010.html

Did you try the Weinre? It's available here http://people.apache.org/~pmuellr/weinre/docs/1.x/1.5.0/ Really nice and easy to use tool.

I am currently successfully using a solution similar to what is described here.

http://blogs.perl.org/users/mark_leighton_fisher/2011/09/debugging-javascript-in-a-webbrowser-control-from-vs2010.html

Caveat: Visual Studio is required.

F12 developer tools enables web developers to quickly debug JavaScript code without leaving the browser. go through this link http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM