How do you attach debugger and stop at a breakpoint in the middle of code?

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

How do you attach debugger and stop at a breakpoint in the middle of code?

by latasoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I saw Martin Krauskopf's blog about attaching to debugger in NetBeans 7.0 (dev).

I really need this and tried it on my NB. I am using NB 6.7.1 and updated to ruby-debug-ide-0.4.9



It sort-of works but has issues. I wanted to understand if I need to upgrade to some other version (7.0 is still not out) where this works or do something else.



If I run from the commandline

> rdebug-ide -p 7000 --stop mycode.rb

and before or after running it, I invoke "Attach Debugger..." in NetBeans, things work fine, i.e code stops at the first line of code in NB.



But, when I remove '--stop' and place a breakpoint in that first line or anywhere else, the execution bypasses the breakpoints.



I can't get it to recognize any breakpoints even after using '--stop' and hitting continue from NB.



Any help or tips is greatly appreciated.






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


Re: How do you attach debugger and stop at a breakpoint in the middle of code?

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Not sure where the problem lies, could you turn on detailed logging for
the debugger (http://wiki.netbeans.org/FaqRubyNBLogging67) and send the
log to me? Also, you may want to experiment starting the debugger
backend by using the Debugger::start_server (with ruby-debug-ide 0.4.6
and later). A brief example:

require 'rubygems'
require 'ruby-debug-ide'

Debugger::start_server('127.0.0.1', 7000)
# to give you some time to attach the debugger
sleep(15)

puts "hello" #put a breakpoint here

Cheers,
Erno


latasoy wrote:

> I saw Martin Krauskopf's blog about attaching to debugger in NetBeans 7.0 (dev).
>
> I really need this and tried it on my NB. I am using NB 6.7.1 and updated to ruby-debug-ide-0.4.9
>
>
>
> It sort-of works but has issues. I wanted to understand if I need to upgrade to some other version (7.0 is still not out) where this works or do something else.
>
>
>
> If I run from the commandline
>
>  
>> rdebug-ide -p 7000 --stop mycode.rb
>>    
>
> and before or after running it, I invoke "Attach Debugger..." in NetBeans, things work fine, i.e code stops at the first line of code in NB.
>
>
>
> But, when I remove '--stop' and place a breakpoint in that first line or anywhere else, the execution bypasses the breakpoints.
>
>
>
> I can't get it to recognize any breakpoints even after using '--stop' and hitting continue from NB.
>
>
>
> Any help or tips is greatly appreciated.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>  


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


How do you attach debugger and stop at a breakpoint in the middle of code?

by latasoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I turned on debugging and attached the log.



It shows that when I tried rdebug with --stop, the break occured, but without it breakpoint is not recognized.



I also triedit with Debugger::start_server  within the code. Again, as soon as I run attach debugger from NB, I see the message 'hello' and the execution goes thru despite the breakpoint at hello.






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