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 166830

Summary: Support debugging of individual grails commands
Product: groovy Reporter: akochnev <akochnev>
Component: GrailsAssignee: Petr Hejl <phejl>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: pjiricka
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: patch to implement this enhancement
zipped up set of individual file patches
a one patch file (all changes in one patch)

Description akochnev 2009-06-10 07:30:48 UTC
Currently, if I want to debug a test, I can possibly run "grails-debug -unit FooBar" and then race to attach the debugger. 

The proposed feature would allow checking a "Debug" checkbox in the "Execute Grails Command..." dialog and would
automatically launch the command using grails-debug, then launch the debugger and attach it to the running process.
Comment 1 akochnev 2009-06-10 07:32:41 UTC
Created attachment 83378 [details]
patch to implement this enhancement
Comment 2 akochnev 2009-06-10 07:35:23 UTC
Some of this functionality was hinted at in the "Run Grails Command..." dialog, the attached patch revives that and
implements it. 

I look forward to your comments and possibly getting this into netbeans. 
Comment 3 akochnev 2009-09-28 17:20:47 UTC
Created attachment 88438 [details]
zipped up set of individual file patches
Comment 4 akochnev 2009-09-28 17:22:30 UTC
Created attachment 88439 [details]
a one patch file (all changes in one patch)
Comment 5 akochnev 2009-10-22 14:39:10 UTC
Any chance of this minor enhancement making into the Grails support ? 
Comment 6 Petr Hejl 2009-10-22 14:45:12 UTC
I plan to provide better support for debugging in next release and I will incorporate this change as well. BTW simple
JPDADebugger.attach won't work well imo. Otherwise the patch looks good. Thanks for that.
Comment 7 akochnev 2009-10-22 14:59:02 UTC
I figured that JPDADebugger.attach is not perfect, but it's the simplest thing that works. I poked around the debugger
API but couln't figure it out - can you give a hint/pointer of the proper way of doing this ? 
Comment 8 Petr Hejl 2009-10-22 19:23:21 UTC
I'm working on such piece of code as it will be needed for the debugger anyway. I'll let you know.
Comment 9 Petr Hejl 2009-10-26 14:47:04 UTC
Closing this as duplicate of issue 123169. I've just attached patch to issue 123169.
akochnev, would be great if you could test it - it contains both Run/Debug action from main menu and "Run/Debug Grails
Command" as well.

*** This issue has been marked as a duplicate of 123169 ***
Comment 10 akochnev 2009-10-26 16:18:07 UTC
I'll test this today : I was just about to rebuild my patched modules to use the "Run Grails Command.." in debug mode in
6.8 beta.