Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser (IE9) F12 Developer Tools(Trying to access Developer Tools using the SWT Browser)
SWT Browser (IE9) F12 Developer Tools [message #1008446] Tue, 12 February 2013 14:27 Go to next message
James Clark is currently offline James Clark
Messages: 4
Registered: February 2013
Junior Member
Hi,

I'm currently trying to utilise the SWT Browser to embed a browser in my Java application. One of the requirements of this browser is that we can add custom javascript into the DOM and then to debug the execution of this script.

Experimenting with the SWT Browser has shown that the DOM interaction should be fine, however I'm struggling with providing the means to debug the script. Ideally I'd like to use well-established Developer Tools such as those with IE9, Chrome or Firebug. I've gone down the XULRunner route and it seems giving the browser access to a firebug extension is a no go (please correct me if I'm wrong).

I thought that as a last alternative, we'd be able to use the Developer Tools bundled with IE9. However, attempting to bring up the tools in the SWT browser control results in nothing happening after pressing F12. Registering a KeyListener on the browser shows that when pressing F12, no KeyPressed event is received (a KeyReleased event is however). I suspect this is not the issue though as none of the shortcuts F-key shortcuts do anything apart from F5 causes a refresh and F10 puts focus on the menu.

Anyone provide any help towards getting a Javascript Debugger attached to the browser or provide insight into why previous attempts are failing?

Thanks for any help,
James
Re: SWT Browser (IE9) F12 Developer Tools [message #1012763 is a reply to message #1008446] Fri, 22 February 2013 07:44 Go to previous messageGo to next message
Wolfgang Groiss is currently offline Wolfgang Groiss
Messages: 1
Registered: February 2013
Junior Member
Hi James,

I see it's been only a few days and there are no replies in this forum. Sadly, I also cannot help but I'm having the same need (use IE9 Developer Tools in an IE embedded via SWT) and was wondering whether you might have found a way to do this yet.

Regards,
Wolfgang
Re: SWT Browser (IE9) F12 Developer Tools [message #1015108 is a reply to message #1008446] Wed, 27 February 2013 13:30 Go to previous messageGo to next message
Konstantin . is currently offline Konstantin .
Messages: 1
Registered: September 2012
Junior Member
We are using DJNativeSwing in our project as "glue" for Java and SWT-Browser (XULRunner). There are some posibilities to debug JS-Code.
First of all the JS-console of XULRunner chrome://global/content/console.xul.
Second is the executeJavascript() method of JWebBrowser - results could be seen on the console or returned to the Java-Code with executeJavascriptWithResult().

It would be a good idea to use just FF with FBug for development and than XULRunner for the production.
Re: SWT Browser (IE9) F12 Developer Tools [message #1015451 is a reply to message #1008446] Thu, 28 February 2013 15:50 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Hi James,

The F12 developer tools are part of IE, not of its embeddable control,
so this won't work in the context of eclipse.

Perhaps Firebug lite could help you here? I believe that it can run in
the context of an IE-based Browser.

Grant



On 2/12/2013 10:01 AM, James Clark wrote:
> Hi,
>
> I'm currently trying to utilise the SWT Browser to embed a browser in my
> Java application. One of the requirements of this browser is that we can
> add custom javascript into the DOM and then to debug the execution of
> this script.
>
> Experimenting with the SWT Browser has shown that the DOM interaction
> should be fine, however I'm struggling with providing the means to debug
> the script. Ideally I'd like to use well-established Developer Tools
> such as those with IE9, Chrome or Firebug. I've gone down the XULRunner
> route and it seems giving the browser access to a firebug extension is a
> no go (please correct me if I'm wrong).
>
> I thought that as a last alternative, we'd be able to use the Developer
> Tools bundled with IE9. However, attempting to bring up the tools in the
> SWT browser control results in nothing happening after pressing F12.
> Registering a KeyListener on the browser shows that when pressing F12,
> no KeyPressed event is received (a KeyReleased event is however). I
> suspect this is not the issue though as none of the shortcuts F-key
> shortcuts do anything apart from F5 causes a refresh and F10 puts focus
> on the menu.
>
> Anyone provide any help towards getting a Javascript Debugger attached
> to the browser or provide insight into why previous attempts are failing?
>
> Thanks for any help,
> James
Re: SWT Browser (IE9) F12 Developer Tools [message #1015968 is a reply to message #1012763] Mon, 04 March 2013 12:48 Go to previous message
James Clark is currently offline James Clark
Messages: 4
Registered: February 2013
Junior Member
Wolfgang Groiss wrote on Fri, 22 February 2013 02:44
Hi James,

I see it's been only a few days and there are no replies in this forum. Sadly, I also cannot help but I'm having the same need (use IE9 Developer Tools in an IE embedded via SWT) and was wondering whether you might have found a way to do this yet.

Regards,
Wolfgang


Hi Wolfgang,

Apologies, I've been on vacation and have only just returned to find your message. I am still currently investigating this however I think things don't look too positive. I'll update this post in the event I do find something.

Konstantin and Grant, thanks for your replies. Unfortunately one of the requirements of what I'm trying to do is that a user will be able to enter some Javascript and then run that script (with the host application injecting in certain objects). I want the user to then be able to debug their script. Using CEF in the C++ world, this was made possible via the user of the Chrome Developer Tools. It's proving tricky in the Java world however!

I'll keep investigating, thanks.

James
Previous Topic:Transparent Shell
Next Topic:SWT Browser event listener issues
Goto Forum:
  


Current Time: Thu Oct 23 11:21:13 GMT 2014

Powered by FUDForum. Page generated in 0.02130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software