OK, this is what I kinda thought in the back of my mind. So... it seems like there are a few issues that *could* be improved as we look forward:
- GWT could generate variable names that match the Java names. I understand this is probably complicated, but it would sure improve the overall experience.
- IDEs (IntelliJ IDEA, in my case) need to be able to go "backwards" from the JS variable to what's in the code to allow us to use the IDE the way we're used to (such as described in my original post). Doing this would meant that #1 isn't really necessary, but it does mean that if you happen to be in the browser dev tools you'd still have the "mangled" names.
- IDEs ought to offer a "Java Compatibility" mode, where by things that are derived from the original Java but are pure JS constructs could be hidden. Things in this category include the GWT-generated fields ($H anyone?) as well as the __proto__ field.
Is there anyone who could speak to the feasibility and effort of these items? I've found myself dreading SDM when I have to do significant debugging. When I need to look at the contents of an array, I just want the contents...not all the other fields that are the result of the Java --> JS translation.
I'm sold on the promise of SDM (and *LOVE* the fast turn-around times) and I *will* be using it. I guess I'm still going to be relying on OldDev mode and my local copy of FireFox 26...
FWIW, I've submitted this topic for consideration in the GWT.create 2015 BOF sessions: https://www.google.com/moderator/#15/e=21ddfd&t=21ddfd.40&v=24, "Better debugging when using SDM (equivalent variable names, IDE expression evaluation, etc...)"
jay
On Wednesday, December 10, 2014 5:07:41 PM UTC-8, Jens wrote:
Please don't forget that you are debugging JavaScript and with the help of source maps it only looks like you are debugging Java because JavaScript code lines are translated back to their Java counter parts.- Currently the SourceMap spec does not support variable names and thats why they are displayed as the original JavaScript variable names.- You can not use every break point feature known from Java. Only the ones that are supported by Chrome / FireFox. That means you can only define conditional break points and the condition must be formulated using JavaScript since the break point is managed by the browser and not IntelliJ. IntelliJ just takes the Java code line of your break point and translates it to the JavaScript code line using SourceMaps and then pushes the break point information to the browser using the browser's remote debugging protocol.Again: You are not debugging Java.-- J.
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