Thursday, September 18, 2014

Re: recognizing errors in embedded JS code

This might be something that the sdbg plugin can handle or should be able to handle in the long run..

https://github.com/sdbg/sdbg

On Saturday, September 13, 2014 4:26:16 PM UTC-7, Magnus wrote:
Hi,

when using embedded JS code, I found that I sometimes do not recognize simple errors like this:


 private native JavaScriptObject makeAnnotation (int x,int y,int as,char c)
 /*-{

  var pi = i * cs + cs / 2;
 ...
  return (i);
 }-*/;

In this case, variable i is not defined. But there is no compiler or runtime error reported. It simply doesn't work and you get the (chrome) browser message "paused in debugger". When you continue debugging, you find yourself somewhere in exception handling code in Impl.java. Then, after setting additional breakpoints, you fnally see, what's wrong.

This process is time-consuming. How can you detect such simple errors sooner?

Thanks
Magnus


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment