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 175488 - [68cat] [debugger] Unable to debug Rake task under Native Ruby with Gems 1.3.5
Summary: [68cat] [debugger] Unable to debug Rake task under Native Ruby with Gems 1.3.5
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 06:00 UTC by esmithbss
Modified: 2010-06-23 22:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE Log File (418.45 KB, text/plain)
2009-10-27 06:01 UTC, esmithbss
Details
output window log for failing example (9.78 KB, text/plain)
2010-03-04 13:36 UTC, gjeudy
Details
IDE debug log file for failing example (93.27 KB, text/plain)
2010-03-04 13:36 UTC, gjeudy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-10-27 06:00:47 UTC
[ BUILD # : 200910261401 ]
[ JDK VERSION : 1.6.* ]

I recently upgraded my gem system to version 1.3.5.  When I attempted to debug my rake task using the native ruby
(1.8.7-p72) I was unable to debug.  The process continued straight through the run without stopping at any of my
breakpoints.
Comment 1 esmithbss 2009-10-27 06:01:36 UTC
Created attachment 90117 [details]
IDE Log File
Comment 2 Erno Mononen 2009-10-27 11:37:52 UTC
Probably a problem in the backend, the commands the IDE sends to it seem to be correct. I'll try to reproduce.
Comment 3 Erno Mononen 2009-11-09 06:15:38 UTC
This works for me with the same ruby and rubygems versions; can you please post a sample rake task where this does not work for you? Or if you can try this from the command line (http://wiki.netbeans.org/RubyDebugging#Checking_debugger_engine_functionality) that would be helpful too. Thanks.
Comment 4 esmithbss 2010-01-07 23:07:31 UTC
I ran the test you highlighted and everything in the test works as the wiki page says it should; however, I am still experiencing this issue under 6.8 now using the rdebug-ide 0.4.9, ruby 1.8.7-p72, and gem 1.3.5.

Here's a bit more detail.

I have a rake task in {proj}/lib/tasks/migrate.rake named ExtractTransformLoad

I have a module named {AppName}/Migrate/Club which migrates my data records when the do_migrate() method is called.

ExtractTransformLoad calls Club.do_migrate()

If I put a breakpoint in ExtractTransformLoad, then the breakpoint is hit and I can step into the Club.do_migrate() routine; however, if I put the breakpoint in Club.do_migrate(), then the breakpoint is never hit.  The system just runs straight through.

Further, if I have a breakpoint in the ExtractTransformLoad, and a breakpoint in the Club.do_migrate, then the ExtractTransformLoad breakpoint is recognized, but the do_migrate breakpoint is not.

This is not the case when I use the built-in JRuby 1.4.0 with 6.8, only when I use the native ruby.

It's as if only the breakpoints in the rake task itself are sent to the native ruby debugger, whereas all defined breakpoints are sent to the JRuby debugger.
Comment 5 gjeudy 2010-03-04 13:36:01 UTC
Created attachment 94769 [details]
output window log for failing example
Comment 6 gjeudy 2010-03-04 13:36:28 UTC
Created attachment 94770 [details]
IDE debug log file for failing example
Comment 7 gjeudy 2010-03-04 13:37:33 UTC
Hi,

I'm also having this issue with NB 6.8, ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32], ruby-debug-ide (0.4.4) and gem 1.3.5.

I tried http://wiki.netbeans.org/RubyDebugging#Checking_debugger_engine_functionality and it worked successfully.

My usecase is the same, I set a breakpoint in a class file called by the rake task. The breakpoint is never hit.
Comment 8 gjeudy 2010-03-05 14:18:02 UTC
Correction i'm using ruby-debug-ide 0.4.6.

I tried setting a breakpoint with the built-in JRuby 1.4.0 and it also fails.

At this point I have no way to debug classes called from inside a rake task. I will have to resort to using a command-line debugger from outside netbeans from the time being.

Let me know if you need more information on my usecase.

Thanks,
Comment 9 esmithbss 2010-03-05 17:32:42 UTC
I've been able to debug rake tasks, but it's not easy.

You need to use the jruby system and put a breakpoint
 on the first line of code in the rake task itself.

Once the debugger stops on the line, you must step through every line
in the task.  The first step over or continue/run will end your debugging session.
Comment 10 esmithbss 2010-06-23 22:24:21 UTC
It appears that this was fixed either at the tail end of 69cat or in the dev as of 20100620.

Closing.