wouterhardeman / play2-maven-plugin

Automatically exported from code.google.com/p/play2-maven-plugin
0 stars 0 forks source link

Enable full debug information on compile #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add JVM options for debug to run goal - e.g. mvn play2:run 
-Dplay2.serverJvmArgs="-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1045"
2. Connect debugger and add breakpoint
3. Trigger breakpoint and notice local variable information is not available

What is the expected output? What do you see instead?
Local variable information is not available.  I think this should be enabled by 
default using the javac option -g:source,lines,vars when compiling the project. 
 I notice in AbstractPlay2ScalaCompileMojo that only -g flag is passed.  Please 
add the full debug information or make this configurable.

What version of the product are you using? On what operating system?
1.0.0-alpha1 on Mac OS.

Please provide any additional information below.

Thanks for an otherwise very useful plugin!

Original issue reported on code.google.com by chr...@cakesolutions.net on 19 Sep 2013 at 11:15

GoogleCodeExporter commented 8 years ago
Issue http://code.google.com/p/play2-maven-plugin/issues/detail?id=2 fixed in 
http://code.google.com/p/play2-maven-plugin/source/detail?r=64

Follow instructions in the issue how to use 1.0.0-alpha2-SNAPSHOT version.

In fact I'm not developing this project any more because of lack of users 
interest.

I can release 1.0.0-alpha2 with this one issue fixed if it will be working for 
you.

Original comment by gslowiko...@gmail.com on 19 Sep 2013 at 7:26

GoogleCodeExporter commented 8 years ago
Hey Grzegorz, great to hear from you.  If it wouldn't be too much trouble to 
release 1.0.0-alpha2 with this one issue fixed then I would be very grateful.  
Of course, we could make this change but I think it would benefit all who do 
still want to use this plugin.  Plus, my colleague mentioned that he had 
problems with a depdendency when building the project, but I don't know the 
details.

Original comment by chr...@cakesolutions.net on 19 Sep 2013 at 7:54

GoogleCodeExporter commented 8 years ago
Problem already fixed when fixing 
[http://code.google.com/p/play2-maven-plugin/issues/detail?id=2 Issue 2]

Version 1.0.0-alpha2 released.

Original comment by gslowiko...@gmail.com on 20 Sep 2013 at 1:20

GoogleCodeExporter commented 8 years ago
Grzegorz, thank you for the release.  We tried it out and it does indeed show 
some debug information.  However,  it doesn't stop on the correct lines and I 
believe this is due to extra flags we need to pass to the -g compiler argument. 
 Please could you revise -g to -g:source,lines,vars and release?

Many thanks!

Original comment by chr...@cakesolutions.net on 24 Sep 2013 at 10:02

GoogleCodeExporter commented 8 years ago
I found that ebean instrumentation adds new lines in the middle of the code 
instead of adding at the end (Cobertura reports are affected). Are you using 
ebean? Does it work with pure Play!?

Original comment by gslowiko...@gmail.com on 24 Sep 2013 at 3:30

GoogleCodeExporter commented 8 years ago
Hi there,

We are using Cobertura but not ebean directly, but I suppose you are saying 
Cobertura is using ebean?  We are actually thinking of moving away from 
Cobertura anyhow.

Original comment by chr...@cakesolutions.net on 24 Sep 2013 at 7:01

GoogleCodeExporter commented 8 years ago
"-g" means "generate all debugging information", see 
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html. 
Problem must be somewhere else.

No, I meant ebean instrumentation introduces problems. I saw it on Cobertura 
reports 
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/reporting/cobe
rtura.

Everything works well with 
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/reporting/cobe
rtura/java/computer-database-jpa, but there are problems with 
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/reporting/cobe
rtura/java/computer-database-ebean (run "mvn clean site" and check 
target/site/cobertura/models.Company.html, run "mvn clean package site" and 
check again, result is diffeners because of ebean instrumentation).

Today I tested remote degugging on three of my test projects:
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/java/helloworl
d
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/java/computer-
database
https://play2-maven-plugin.googlecode.com/svn/trunk/test-projects/java/computer-
database-jpa
Everything works.

Can you attach here (or send me directly) sample project showing problems with 
stopping on wrong lines?

Original comment by gslowiko...@gmail.com on 25 Sep 2013 at 8:40

GoogleCodeExporter commented 8 years ago
Grzegorz, you can forget the previous comment and you're absolutely right it's 
adding all the debug options.  Seems my colleagues IDE was playing up or there 
was some code sync issue.

Thank you for your time in resolving this!

Original comment by chr...@cakesolutions.net on 30 Sep 2013 at 1:51

GoogleCodeExporter commented 8 years ago

Original comment by gslowiko...@gmail.com on 2 Jun 2014 at 7:46