I wanted to launch GWT SuperDevMode and set breakpoints on Chrome or Edge's DevTools, but previously I was able to view the source and set breakpoints. However, the source is not displayed due to recent browser updates.
for local startup
Web container: http://127.0.0.1:8888/
souecemap: http://127.0.0.1:9876/
So it's a cross-origin, but when I check it with Chrome's DevTools,
DevTools failed to load source map: Could not load content for http://127.0.0.1:8888/sourcemaps/GwtModule/gwtSourceMap.json: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
is displayed in the console as a warning.
However, the source map specification is
//# sourceMappingURL=http://127.0.0.1:9876/sourcemaps/GwtModule/gwtSourceMap.json
It states. Therefore, it seems that the port specification is forcibly rewritten(9876->8888) by the browser.
Is this behavior due to security enhancements? Or is it just a bug?
This issue was in GWT2.6.1 and may have been resolved in later versions. In order to deal with GWT2.6.1, customize JettyLauncher.java in gwt-dev.jar to retrieve and return port 9999 origin via Filter for sourcemap request of port 8888 origin, and add that class to project You can deal with it by placing it in src and using it.
com.google.gwt.dev.shell.jetty.JettyLauncher.java (custom. Added wac.addFilter() )
com.google.gwt.dev.shell.jetty.SourcemapFilter.java (custom. new class )