Debugging last line of method

I am wondering how to inspect the @cart instance variable in a debugging session.  What I see happening is after the line executes the debugger jumps to the next statement, and I am not able to see the contents of the @cart variable.
Capture.PNG

Thanks for any help!

2 comments
Comment actions Permalink

Yes, it's obviously not possible to set the breakpoint to the very last line of the method declaration (the line containing the "end") – which is a pity. You don't get the @cart object because the breakpoint is set before the @cart object is instantiated.

Hubert
----
RM 96.552/MacOS X 10.6.4/MacPro 2x2.66GHz Dual-Core Intel Xeon/7GB RAM

0
Comment actions Permalink

Hello Hubert,

Yes, it's obviously not possible to set the breakpoint to the very last line of the method declaration (the line containing the "end") – which is a pity. You don't get the @cart object because the breakpoint is set before the @cart object is instantiated.

Yes it's a ruby-debug limitation. The last line of method is not a stopping point in file.
Even if you try console debug you'll get an error on attempt to set up breakpoint on the last line.

Best regards,
Oleg

0

Please sign in to leave a comment.