简体   繁体   中英

client-side breakpoints for GWT maven project work in Eclipse but not Netbeans

I've been trying in Netbeans to break into the client-side code for a project built with gwt-maven-plugin 2.7.0. My dev environment: win7 64bits, java 7.0.60, netbeans 8.01

I build the bare-bones project with the gwt-maven-plugin artifact, do a maven clean install, then a gwt:debug, everything (devmode/jetty) starts up correctly (no visible error), I can break into the server-side code, but as far as the client-side breakpoints are concerned, it will only work if I use Eclipse + Google plugin...no luck with netbeans.

Any idea what is wrong ?

For your reference, please find below the output of my gwt:debug in Netbeans.

Thank you very much in advance for your feedback and your expertise.

Regards

kb

cd C:\DN\MyApp; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_60" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0.1\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0.1\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 gwt:debug\""
Scanning for projects...

------------------------------------------------------------------------
Building GWT Maven Archetype 1.0-SNAPSHOT
------------------------------------------------------------------------

>>> gwt-maven-plugin:2.7.0:debug (default-cli) @ MyApp >>>

--- gwt-maven-plugin:2.7.0:generateAsync (default) @ MyApp ---

--- maven-resources-plugin:2.5:resources (default-resources) @ MyApp ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 2 resources

--- maven-compiler-plugin:2.3.2:compile (default-compile) @ MyApp ---
Nothing to compile - all classes are up to date

<<< gwt-maven-plugin:2.7.0:debug (default-cli) @ MyApp <<<

--- gwt-maven-plugin:2.7.0:debug (default-cli) @ MyApp ---
starting debugger on port 8000 in suspend mode
create exploded Jetty webapp in C:\DN\MyApp\target\MyApp-1.0-SNAPSHOT
Listening for transport dt_socket at address: 8000
Super Dev Mode starting up
   workDir: C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp
   Loading Java files in com.mycompany.myapp.MyApp.
   Module setup completed in 4879 ms

The code server is ready at http://127.0.0.1:9876/
GET /recompile/MyApp
   Job com.mycompany.myapp.MyApp_1_0
      starting job: com.mycompany.myapp.MyApp_1_0
      binding: user.agent=safari
      Compiling module com.mycompany.myapp.MyApp
         Unification traversed 16789 fields and methods and 1580 types. 1548 are considered part of the current module and 1548 had all of their fields and methods traversed.
         Compiling 1 permutation
            Compiling permutation 0...
            Linking per-type JS with 1532 new types.
               prelink JS size = 2512880
               prelink sourcemap = 2512880 bytes and 73220 lines
               postlink JS size = 2384562
               postlink sourcemap = 2384562 bytes and 69785 lines
            Source Maps Enabled
         Compile of permutations succeeded
         Compilation succeeded -- 7.911s
      Linking into C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp\com.mycompany.myapp.MyApp\compile-2\war\MyApp; Writing extras to C:\Users\myname\AppData\Local\Temp\gwt-codeserver-6759665201993273993.tmp\com.mycompany.myapp.MyApp\compile-2\extras\MyApp
         Link succeeded
         Linking succeeded -- 0.824s
      8.817s total -- Compile completed

GWT 2.7's DevMode defaults to using SuperDevMode (as you can see in your logs), rather than "classic DevMode" with the browser plugin.

With SuperDevMode you debug client-side code in your browser using source maps, or in your IDE by remote-debugging your browser (in Eclipse using SDBG for example).

To roll back to "classic DevMode", configure your gwt-maven-plugin with <superDevMode>false</superDevMode> or pass -Dgwt.superDevMode=false to Maven.
See http://mojo.codehaus.org/gwt-maven-plugin/debug-mojo.html#superDevMode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM