Source maps

535 views
Skip to first unread message

Honza Rames

unread,
Apr 1, 2012, 6:16:05 AM4/1/12
to google-we...@googlegroups.com
Hi everyone,
I tried to compile my GWT app with source maps support (as explained here http://stackoverflow.com/questions/9804492/how-to-try-sourcemaps-with-gwt) and it failed at first (some json stuff was missing) so I added it to my project's class path then it compiled OK and I can see the source maps generated in WEB-INF/deploy/<project>/symbolMaps. I should also note that I'm using custom build of GWT from trunk. I enabled source maps support in Chrome's Developer tools setting panel but I the source maps doesn't seem to work. I'm launching the app through jetty but not in dev mode (obviously ;-) ) I compiled the project in obfuscated mode as standard compile (no draft or anything like that). Do I have to use another version of Chrome? Does anyone tried this as well and succeeded?

Honza

Andrea Boscolo

unread,
Apr 1, 2012, 7:20:13 AM4/1/12
to google-we...@googlegroups.com
Are you sure the whole machinery is already available in the public (trunk) repo? I thought it's not.

https://plus.google.com/u/1/110412141990454266397/posts/Nvr6Se6eAPh

Gal Dolber

unread,
Apr 1, 2012, 12:31:06 PM4/1/12
to google-we...@googlegroups.com
got exited for a minute... its not there yet, I'm checking out trunk everyday hoping to see SuperDraftMode and SourceMap commited

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hcGUk2-d124J.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/




Gal Dolber

unread,
Apr 1, 2012, 12:34:54 PM4/1/12
to google-we...@googlegroups.com
oh, my mistake, it seems SourceMap is there.. are you using trunk?

Honza Rameš

unread,
Apr 2, 2012, 2:45:35 AM4/2/12
to google-we...@googlegroups.com
Yep, I'm using trunk but I'm not sure that the source map support is fully functional even in trunk though it gets generated. I tried both canary and dev channels of Chrome (I think even Googlers won't use anything special since canary is almost daily build but we cannot be sure ;-) )

Honza

Dan Cojocar

unread,
Apr 2, 2012, 3:27:01 AM4/2/12
to google-we...@googlegroups.com
Yes, some bits are still missing, but using trunk and following the instructions from here: http://code.google.com/p/google-web-toolkit/wiki/SourceMaps (with few additional steps, mentioned in the comments) I was able to debug the Mail application, using the java sources in Development tools.

Honza Rameš

unread,
Apr 2, 2012, 4:17:15 AM4/2/12
to google-we...@googlegroups.com
Thanks cool, this way it works just fine, I also had to symlink my java sources so the browser could access them, you can do this by creating a symlink to you com (org or whatever package you use as base) in you war/<project-name> folder (where the cache.htmls are generated and where you copy source maps to). It would probably be a lot better to have a servlet that can handle fetching the sources and also a modified linker that adds the sourceMappingURL to the generated JS (I guess this gets more complicated when code splitting is in play).

Honza

Thomas Broyer

unread,
Apr 2, 2012, 5:41:56 AM4/2/12
to google-we...@googlegroups.com

On Monday, April 2, 2012 10:17:15 AM UTC+2, Honza Rames wrote:
Thanks cool, this way it works just fine, I also had to symlink my java sources so the browser could access them, you can do this by creating a symlink to you com (org or whatever package you use as base) in you war/<project-name> folder (where the cache.htmls are generated and where you copy source maps to). It would probably be a lot better to have a servlet that can handle fetching the sources and also a modified linker that adds the sourceMappingURL to the generated JS (I guess this gets more complicated when code splitting is in play).


According to http://code.google.com/p/google-web-toolkit/source/detail?r=10760 only the xsiframe linker (<add-linker name='xsiframe'/>) will output the //@ sourceUrl=…
It's also only used for stack-trace deobfuscation (as is said on the wiki page), which is why it doesn't Just Work™ with Chrome's Developer Tools' support for Source Maps (no //@ sourceMappingURL=…, and the generated artifacts are not publicly accessible)
It also won't work if you use the experimental Closure Compiler backend.

Joseph Lust

unread,
Jul 31, 2012, 12:53:08 PM7/31/12
to google-we...@googlegroups.com
FYI, Source Map support is now in Mozilla Firefox nightly builds! Soon Alan's life will be much easier. Read more details here.


Sincerely,
Joseph

Juan Pablo Gardella

unread,
Jul 31, 2012, 12:54:15 PM7/31/12
to google-we...@googlegroups.com
:) Good news. Alan will be happy

2012/7/31 Joseph Lust <lifeo...@gmail.com>
FYI, Source Map support is now in Mozilla Firefox nightly builds! Soon Alan's life will be much easier. Read more details here.


Sincerely,
Joseph

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
Reply all
Reply to author
Forward
0 new messages