Hi,

for those you are currently working with the (wrapping) Browser widget, I have 
some useful debugging hints.
Those information are also important for those who try to refactor the widget 
since you don’t want to break the following features ;)

0) Unfortunately you can’t use the Eclipse debugger. A call to any run method 
will delegate the control flow to the browser used by SWT which does not 
support debugging at this stage.
1) Runtime Exceptions thrown in the browser by scripts invoked by Java code 
(Browser.run*) are caught and thrown on Future.get().
2) Runtime Exceptions thrown in the browser by scripts invoked by JavaScript 
(e.g. a user clicked on a button) are caught and made available using a 
registered JavaScriptExceptionListener.
3) SyntaxException are thrown on a get call on the Future object returned by 
Browser.open.
4) You can use console.log and console.error in your JavaScript code for 
debugging. Calls to these functions are forwarded to the Eclipse console.
5) You can open the currently opened document (in its current state which can 
differ from the original state due to DOM modifications) in your system’s 
default browser using the Safari/Chrome Web Inspector shortcut (on Mac: Shift + 
Alt + Cmd + I). So pressing it twice will open the document in your browser and 
open the browser’s web inspector making debugging far less cumbersome than 
expected.

Best,

MSc. Inf. Björn Kahlert

[cid:12D5553D-AD16-40D5-986F-BF6FABF0587B]   
[cid:53AF5887-D1F2-4BAA-BF6C-CF01BF1C6DB7]

Institute of Computer Science
Software Engineering Working Group
Algorithmic Bioinformatics Working Group

Freie Universität Berlin
Takustr. 9, 14195 Berlin
Phone +49 30 838 75228, Room K25

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to