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 255967 - Grails project debug is not working
Summary: Grails project debug is not working
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: bruno.flavio
URL:
Keywords:
: 220937 (view as bug list)
Depends on: 256159
Blocks: 254336
  Show dependency tree
 
Reported: 2015-10-16 07:33 UTC by thruminds
Modified: 2016-02-11 07:53 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Uses the appropriate flags to run grails 2 and 3 in debug. (2.67 KB, patch)
2015-10-24 23:15 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description thruminds 2015-10-16 07:33:05 UTC
When choosing Debug from the project menu (of a Grails project), the debugger does not start working, and no output is displayed in the console.
Comment 1 bruno.flavio 2015-10-18 22:41:25 UTC
I confirm the reported behaviour: NetBeans is expecting a no longer used "grails-debug" command to start the debug.

The debug for grails 3 projects is done passing the --debug-jvm parameter when running.

Grails 2 requires the --debug-fork parameter.

I've experimented with a preliminary patch for a grails 3 project with the correct parameter and debug worked well (setting breakpoints and inspecting declared variables).

I'll prepare a patch that works with grails 2 and 3 and report back.
Comment 2 bruno.flavio 2015-10-24 23:15:23 UTC
Created attachment 156957 [details]
Uses the appropriate flags to run grails 2 and 3 in debug.

This patch applies the correct flags to enable the debug mode.

In order to apply the right flag I've added the grails 2 & 3 versions which revealed a problem: The approach used to find the grails platform version isn't compatible with grails 3 - #256159

Therefore this patch depends on the patch provided for #256159 to work correctly.

I've tested against grails 2.5.1, 3.0.4 and 3.0.9 and got the expected behaviour.
I've left the grails 1 approach intact, which requires the grails-debug command. However I wonder if it's reasonable to keep supporting grails 1.
Comment 3 bruno.flavio 2015-11-15 20:38:56 UTC
*** Bug 220937 has been marked as a duplicate of this bug. ***
Comment 4 bruno.flavio 2015-12-15 00:28:46 UTC
Patch integrated, rev http://hg.netbeans.org/core-main/rev/65d3bf743e68
Comment 5 thruminds 2015-12-15 07:58:17 UTC
(In reply to bruno.flavio from comment #4)
> Patch integrated, rev http://hg.netbeans.org/core-main/rev/65d3bf743e68

Good job. Waiting for the dev build to test it.
Comment 6 Jiri Kovalsky 2015-12-15 10:20:41 UTC
This is not fixed in 8.1 yet. Only trunk i.e. development version right now.
Comment 7 Quality Engineering 2015-12-16 02:31:26 UTC
Integrated into 'main-silver', will be available in build *201512160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/65d3bf743e68
User: Bruno Fl
Comment 8 luis.teixieira 2015-12-31 10:52:41 UTC
"Verified working with *201512310002* on Grails 3.0.4 and 2.5.1."
Comment 9 bruno.flavio 2015-12-31 18:27:28 UTC
This issue resolves the inability to debug grails 2 and 3 applications. As such I believe it should be included in the 8.1 Patch 1, as well as the issue it depends on - #256159.
Comment 10 Jiri Kovalsky 2016-01-27 17:56:00 UTC
Bruno, can you please integrate this fix to release81 branch? Thanks!
Comment 11 Jiri Kovalsky 2016-01-27 17:56:26 UTC
For the record, deadline is 1/31.
Comment 12 bruno.flavio 2016-01-27 18:03:17 UTC
(In reply to Jiri Kovalsky from comment #11)
> For the record, deadline is 1/31.

Sure. I'll integrate the fix and upgrade the relevant module versions by Friday.
Comment 13 bruno.flavio 2016-01-28 22:43:42 UTC
The fix has been applied to the release81 branch.
Comment 14 Jiri Kovalsky 2016-01-29 07:44:42 UTC
Thanks Bruno. Do you have changeset number?
Comment 15 bruno.flavio 2016-01-29 08:24:58 UTC
(In reply to Jiri Kovalsky from comment #14)
> Thanks Bruno. Do you have changeset number?

Sorry, here it is:

Fix: http://hg.netbeans.org/releases/rev/d16a179c4dfe

Spec version and message update: http://hg.netbeans.org/releases/rev/e6a78d0b0996