This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 215575 - '-Xdebug' flag missed after re-run project
Summary: '-Xdebug' flag missed after re-run project
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on: 215594
Blocks:
  Show dependency tree
 
Reported: 2012-07-16 08:51 UTC by evillive
Modified: 2013-02-21 12:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test project to reproduce issue (2.79 KB, application/zip)
2012-07-16 08:51 UTC, evillive
Details

Note You need to log in before you can comment on or make changes to this bug.
Description evillive 2012-07-16 08:51:29 UTC
Created attachment 122050 [details]
Test project to reproduce issue

I'm using org.codehaus.mojo:exec-maven-plugin:1.2:exec to run maven project and i've configured 'exec.args' with following options:

 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4001 ...

And everything was fine, but in 7.2 there is regression: Netbeans cuts this options from command execution string. So all the custom options specified in 'exec.args' are applied to the final command string, except '-Xdebug' related.

Steps to reproduce:

1. Open attached 'testproject1'
2. Run project via 'Run' or F6
3. Wait for test application prints "'-Xdebug' found. Now stop app and re-run using F6 or 'right click -> run'"
4. Stop app. Do not close output window.
6. Re-run app via F6, or right-click -> Run on project node. Do not use "Re-run the goals." from Output window.

Expected:
Application prints "'-Xdebug' found. Now stop app and re-run using F6 or 'right click -> run'"

Actual:
Applications throws java.lang.IllegalStateException: '-Xdebug' not set
Comment 1 Milos Kleint 2012-08-22 08:35:46 UTC
I'm wondering why you are adding debugging parameters to the run action. The debug action should be able to do what you want and probably is doing so already by default. And is probably also properly converting to CoS execution.
Comment 2 Milos Kleint 2012-10-31 09:14:13 UTC
the main problem here is that when Compile on save is on, the Run action will be executed by the internal Ant script -IN IDE VM- so  debugging jvm switches make little sense. Debug project internal ant script keeps it's own debugger wiring as well, so we strip the debugging settings all the time when run through the internal ant script. issue 215594 is filed for us to come up with maven only solution that would work more reliably for more complex customizations.
Comment 3 Milos Kleint 2013-02-21 12:56:14 UTC
since https://hg.netbeans.org/core-main/rev/2a24101df218 the setup described in this issue should not pose a problem anymore