NB6.7 Ruby debugger stops in rakefile only when started using rake

View: New views
4 Messages — Rating Filter:   Alert me  

NB6.7 Ruby debugger stops in rakefile only when started using rake

by dyrathror :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,



I am using the following components:

Vista SP2

JDK-1.6.0_14-b08

NB6.7

JRuby 1.3.1



And run rspec-1.2.6 from a rake task with the debug option enabled.

Now I would like to debug my specs and my code but the ruby debugger only stops on the breakpoints I have set in the rakefile. Neither the breakpoints in the spec-file nor in my sources are triggered.



Any ideas what I can do?



Thanks,

D.

------------------------
If all else fails, read the manuals.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


NB6.7 Ruby debugger stops in rakefile only when started using rake

by dyrathror :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ok, as far as I understand, NB starts rake which starts a new ruby engine for the task. That is why the debugger stops in the rakefile but not in my code.



Is there any possibility to attach the debugger automatically to the new ruby instance?



D.

------------------------
If all else fails, read the manuals.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: NB6.7 Ruby debugger stops in rakefile only when started using rake

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

dyrathror wrote:
> Ok, as far as I understand, NB starts rake which starts a new ruby engine for the task. That is why the debugger stops in the rakefile but not in my code.
>  

Yes, that's the case.

> Is there any possibility to attach the debugger automatically to the new ruby instance?
>  

Unfortunately no automatic way at the moment. I can think of a couple of
ways to debug the rspec task, though nothing too practical: You can get
the command the rspec task runs and then run the command manually so
that you can attach the debugger to it as per the instructions here:
http://blogs.sun.com/martink/entry/remote_debugging_debug_whatever_ruby.
Or perhaps you can hack the task itself so that it runs through
rdebug-ide. There may be also better ways that don't come to my mind
right now.

Obviously it would be nice if the IDE handled this automatically, the
best would be if RSpec provided appropriate support for this - I'll need
to talk to the RSpec guys.

Cheers,
Erno


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


NB6.7 Ruby debugger stops in rakefile only when started using rake

by dyrathror :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Erno,



it would be nice if the debugger would just follow the process flow into the rspec and into the code because at the moment I have to write additional code just to be able to debug the code which I trigger already with my tests.



The example in Martin's blog starts the debugger from command line and then attaches the NB to it. This would mean that I would have to change the rspec code which does the command line start. At the moment I still don't feel strong enough in Ruby for such experiments ;) In several month this might have changed.



Stephan

------------------------
If all else fails, read the manuals.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...