Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Mark Roghelia
RE: Missing "source" command on OSX [ reply ]  
2009-02-05 05:42
Yeah, I just built from trunk and the source command has returned.

By: Rocky Bernstein
RE: Missing "source" command on OSX [ reply ]  
2009-02-05 03:47
I just had a chance to check this out.

First, I think I may have been wrong about this being an OSX versus Linux thing. On an Ubuntu box this works fine and on OSX I get the problem described. On the other hand it could be related to a Ruby version difference. On Ubuntu I have
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] and on OSX: 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

However when I try with the current svn sources on OSX, I don't have a problem on either platform. Could you verify this is so?

But what's weird here is that I can't find anything in the ChangeLog since the 0.10.3 release that seems to relate to changing this behavior. The only change that might have an effect is in ruby-debug/cli/ruby-debug/processor.rb where these lines were added:

+ rescue SignalException
+ raise

So again independent confirmation would help.

By: Mark Roghelia
RE: Missing "source" command on OSX [ reply ]  
2009-02-04 17:46
I went back and installed some older versions and confirmed that the "source" command appears in 0.10 - 0.10.2. It is only with the latest versions that I don't have it.

By: Mark Roghelia
RE: Missing "source" command on OSX [ reply ]  
2009-02-04 17:17
I've also set a breakpoint and continued until I hit it, then run 'help'. Again, no 'source' command listed even though the program is still running.

A related issue I've encountered is that setting breakpoints in .rdebugrc does not work, though it used to on older releases. I used to routinely put a copy of .rdebugrc in the top of my project directory. I had automated TextMate to add breakpoints to this file by pressing a certain keyboard shortcut. This was nice because I could use the editor to set the breakpoints and they would be stored between runs of rdebug. I realize I could do something similar running rdebug constantly as a server and setting breakpoints remotely, but I liked this setup because I don't use the debugger all the often and don't want to always run it. Anyway, somewhere along the line I noticed the breakpoints in .rdebugrc were ignored on the latest releases.

This is why I started looking at the "source" command, because I figured I could at least put my breakpoints in a file other than .rdebugrc and then source it. But I can't get the source command to work either (on the Mac).

By: Mark Roghelia
RE: Missing "source" command on OSX [ reply ]  
2009-02-04 16:56
In both cases (Linux and Mac) the prompt is (rdb:1). I start rdebug (rdebug test.rb) and type 'help' when the prompt appears. No 'source' in the Mac case.

By: Rocky Bernstein
RE: Missing "source" command on OSX [ reply ]  
2009-01-23 20:29
It's probably not a Mac vs PC (or GNU/Linux) thing. More likely it is a control processor versus command interface thing.

The 'source' command is not available in a "control processor" or what you are in after a running program terminates. Not an ideal since reading debugger commands still seems like something one might want to do, but that's the way it currently is.

If you are in a control processor the prompt is (rdb:ctrl), and no "source" command. If there is a program running, the prompt will have a thread number, usually 1, e.g. (rdb:1).

By: Mark Roghelia
Missing "source" command on OSX [ reply ]  
2009-01-12 16:42
I have rdebug 0.10.3 installed on both a Mac and a CentOS 5 server. On the Mac the "source" command appears to be missing.

For example, when I run "help" on the Mac I get this:

ruby-debug help v0.10.3
Type 'help <command-name>' for help on a specific command

Available commands:
backtrace delete enable help next quit show undisplay
break disable eval info p reload step up
catch display exit irb pp restart thread var
condition down finish list ps save tmate where
continue edit frame method putl set trace


And on Linux I get:


ruby-debug help v0.10.3
Type 'help <command-name>' for help on a specific command

Available commands:
backtrace delete enable help next quit show undisplay
break disable eval info p reload source up
catch display exit irb pp restart step var
condition down finish list ps save thread where
continue edit frame method putl set trace

Notice "source" is listed on Linux but not the Mac. On the Mac if I try to use the "source" command I get the message "NameError Exception: undefined local variable or method `source' for main:Object".

Thanks.