5

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?

Júlio Griebeler
  • 842
  • 2
  • 8
  • 20
  • what do you mean console.log breaks stuff? – Ibu Oct 23 '12 at 18:18
  • 1
    @Ibu Have you ever tried to `console.log()` [something in IE?](http://stackoverflow.com/questions/690251/what-happened-to-console-log-in-ie8) – msanford Oct 23 '12 at 18:32
  • @msanford yes i did, and it works perfectly well, open your dev tool window and check it out. – Ibu Oct 23 '12 at 18:44
  • @Ibu See the link I included in my comment and *don't* open your Developer Tools window (which his embedded browser lacks). I *assume* the "brakes the layout" the OP is referring to is due to that behaviour. – msanford Oct 23 '12 at 18:50
  • 1
    I try console.log() in internet explorer but it doesnt understand the reserverd word 'console'. About your link, alerts breaking the sequence of my js function and it must runs for complete. – Júlio Griebeler Nov 05 '12 at 19:15

5 Answers5

2

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
romuloigor
  • 182
  • 1
  • 11
1

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

thomthom
  • 2,854
  • 1
  • 23
  • 53
0

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.

Kamil
  • 2,712
  • 32
  • 39
0

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.

Mark
  • 312
  • 4
  • 17
-1

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

Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70