We've considered it, but all of the benefit of DevMode (avoiding recompile)
goes out the window. If you change code, you have to recompile, so the whole
edit-refresh cycle takes a lot longer.

If you really just want source-level debugging of compiled GWT apps, this
can be done with SourceMaps:
http://code.google.com/p/google-web-toolkit/wiki/SourceMaps

With sufficient integration with the IDE, you could hook up a Firefox or V8
external Javascript debugger, reverse-map any Javascript position to source
Java/Line Number, and have the IDE show that line. You could forward-map
break points to the correct JS breakpoint setting (although this may require
turning off optimizations to prevent making the entire program 1 single
line). This is all pretty straightforward and has been done for Closure
Compiler already. The real difficulty is dealing with Expression Evaluation,
if you evaluate a Java expression in the debugger, it would have to be
'compiled' on the fly to JS.

-Ray


On Mon, Oct 3, 2011 at 3:39 PM, Eric Ridge <[email protected]> wrote:

> Not real fresh, but still edible...
>
> I send the below to the [email protected] list last
> week, but I can't find a link to it via groups.google.com.  Maybe it
> got held for moderation?
>
> eric
>
> -------
>
> Anyways, I think it's entirely possible.
>
> Here's the solution -- ditch the plugins entirely.
>
> Instead, develop a Java applet that functions as a JPDA server that
> knows how to translate the state of the running GWT app into the JPDA
> protocol so a remote Java debugger can understand it.  The applet
> would be embedded into the module's primary .html page.
>
> The concept of "devmode" basically goes away and instead the GWT
> compiler would have a "DEBUG" output format which would include code
> that passes state information to the JPDA Java applet as the
> javascript executes.
>
> Have youse guys considered anything like this?  The JPDA applet is
> just a SMOP, but I'd have to guess adding a "DEBUG" output format to
> the GWT compiler would be pretty big.  "F5/Refresh" performance would
> need consideration in this too.
>
> It's a totally half-baked idea right now, but I wanted to toss it out
> to see if the smarties at google think it's worth further thought.
>
>
> On Mon, Oct 3, 2011 at 6:22 PM, Tomasz Gawel <[email protected]> wrote:
> > Fresh idea.
> > and what about implementing debugger in an applet? :)
> >
> > --
> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
> >
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to