[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Mr. Guid 0.2 (Cross-platform Ruby GUI Debugger

mitchell

2/23/2006 2:43:00 AM

Mr. Guid 0.2 is a milestone release because it can now be run on both
Linux and Windows without any compatibility issues.

Notable changes since 0.1.4:
- All debugging is done via TCP instead of UNIX sockets
- Instance variables view
- Increased efficiency overall
(Thanks to Matthias Georgi for his help)

Website: http://mr-guid.rub...
Project page: http://rubyforge.org/projec...

Mitchell's Ruby GUI Debugger (Mr. Guid) is a simple cross-platform Ruby
GUI debugger written in Ruby using the Ruby/Gtk2 bindings for GTK+. It
is only meant to be a debugger, not an editor or IDE.

21 Answers

henon man

2/23/2006 6:59:00 AM

0

thanks for this !!!
i have waited so long for a decent debugger for ruby.

-- henon

On 2/22/06, mitchell <ffsnoopy@gmail.com> wrote:
> Mr. Guid 0.2 is a milestone release because it can now be run on both
> Linux and Windows without any compatibility issues.
>
> Notable changes since 0.1.4:
> - All debugging is done via TCP instead of UNIX sockets
> - Instance variables view
> - Increased efficiency overall
> (Thanks to Matthias Georgi for his help)
>
> Website: http://mr-guid.rub...
> Project page: http://rubyforge.org/projec...
>
> Mitchell's Ruby GUI Debugger (Mr. Guid) is a simple cross-platform Ruby
> GUI debugger written in Ruby using the Ruby/Gtk2 bindings for GTK+. It
> is only meant to be a debugger, not an editor or IDE.
>
>
>


mitchell

2/23/2006 12:40:00 PM

0

Sorry all, I am having some instability issues in the windows version I
will have a fix soon.

mitchell

2/24/2006 2:59:00 AM

0

Okay, my experiments show that TCP in the Windows version of Ruby
doesn't work like the Unix/Linux version. This is causing the
instability of the windows version of Mr. Guid. My only suggestion
right now for the Windows users is to get Ruby running in Cygwin.

I would appreciate more help figuring out how to work around this
problem of course so that cygwin is not needed.

Here is what I have figured out:
1. The TCPServer starts correctly and runs the 'accept' method waiting
for a connection
2. The TCPSocket successfully connects to the TCPServer.
3. The TCPServer "freezes" (or craps out) when trying to print data
(print, puts methods)
4. The TCPSocket "freezes" (or craps out) when trying to recieve data
(gets method)

3 and 4 work as expected in Unix/Linux, so Mr. Guid functions just
fine. It's just pesky Windows...

Bill Kelly

2/24/2006 3:20:00 AM

0

From: "mitchell" <ffsnoopy@gmail.com>
>
> Okay, my experiments show that TCP in the Windows version of Ruby
> doesn't work like the Unix/Linux version. This is causing the
> instability of the windows version of Mr. Guid. My only suggestion
> right now for the Windows users is to get Ruby running in Cygwin.
>
> I would appreciate more help figuring out how to work around this
> problem of course so that cygwin is not needed.
>
> Here is what I have figured out:
> 1. The TCPServer starts correctly and runs the 'accept' method waiting
> for a connection
> 2. The TCPSocket successfully connects to the TCPServer.
> 3. The TCPServer "freezes" (or craps out) when trying to print data
> (print, puts methods)
> 4. The TCPSocket "freezes" (or craps out) when trying to recieve data
> (gets method)
>
> 3 and 4 work as expected in Unix/Linux, so Mr. Guid functions just
> fine. It's just pesky Windows...

Hi, I'm just jumping in here... dunno if this helps. But up
through 1.8.2, Ruby didn't support non-blocking socket I/O on
Windows. I haven't personally tried non-blocking I/O on 1.8.4
Windows Ruby yet--however, looking through the sources, it
appears it is now supported!

That said, I'm not certain gets/puts are nonblocking-savvy on
Windows or not, even in 1.8.4. But it looks like send() should
be, now.

(And even in 1.8.4 I'm guessing popen() will still block in
Windows. (It definitely blocks in 1.8.2...))

Well anyway, for what it's worth ...........


Regards,

Bill




Meinrad Recheis

2/24/2006 7:19:00 AM

0

could you introduce a switch to turn of the usage of TCPServer
completely? maybe that would enable debugging locally on windows
(hopefully).

- henon

mitchell

2/24/2006 10:52:00 PM

0

Unfortunately, I cannot use the send or recv commands because of
buffering issues with TCP. It has to be gets/puts which is quite
unfortunate, but I have no other simple workaround.

mitchell

2/24/2006 10:53:00 PM

0

This is not possible. Mr. Guid depends on TCP to do its debugging. Any
other method of communication between the debugger and Mr. Guid that I
can think of is inefficient. If you have any ideas, I would like to
hear them :)

Stephen Waits

2/24/2006 11:08:00 PM

0

mitchell wrote:
> Mr. Guid 0.2 is a milestone release because it can now be run on both
> Linux and Windows without any compatibility issues.

Looks cool. Simple and to the point.

Any MacOS X plans?

--Steve



Bill Kelly

2/24/2006 11:10:00 PM

0

From: "mitchell" <ffsnoopy@gmail.com>
>
> Unfortunately, I cannot use the send or recv commands because of
> buffering issues with TCP. It has to be gets/puts which is quite
> unfortunate, but I have no other simple workaround.

Hi, could you explain more about what you mean by buffereing issues?

I primarily use send/recv with TCP. It's not hard to make a
puts/gets wrapper around send/recv, for instance.


For ex: (untested, but similar to what i frequently have used)

def send_string(sock, str)
begin
while str.length > 0
if select(nil, [sock], nil, nil)
sent = sock.send(str, 0)
str = str[sent..-1]
end
end
rescue IOError, SystemCallError, SocketError
# ... set eof flag?
end
end

def puts(sock, str)
send_string(sock, "#{str}\n")
end

sock.fcntl(Fcntl::F_SETFL, sock.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK) if defined? Fcntl::O_NONBLOCK

puts(sock, "hello")


Regards,

Bill




mitchell

2/24/2006 11:29:00 PM

0

Steve wrote:
> Any MacOS X plans?

Theoretically it should work on OSX because it can run linux apps. I
dont have a mac or access to one, so I could be wrong, but all you
would need I think is (preferrably the unix/linux versions of) ruby and
ruby-gtk2 (libglade and gtk2)