From: "Mehr, Assaph (Assaph)" Date: 2004-09-17T16:40:33+09:00 Subject: Re: Debugging wxruby programs. > Yes, I've installed both ruby and wxruby. The problem I have is that > if the app fails to start, it is sometimes due to syntax errors and > sometimes due to runtime errors (e.g. a nil member variable, etc.). > Without a DOS/Command window, firstly, I've no idea if it's a syntax > error, Syntax errors are always reported by the Ruby parser, nothing to do with wxRuby. If you have a syntax error you will get the appropriate message when you load the file. > secondly, even if it does start, I can't use 'print' to print > out debugging statements to help me find out where I got to and what > went wrong (OK, I can open an auxilliary window and write to that, but > I could lose that window if the app dies). That sounds weird. I have no problem writing to stdout from within a wxRuby app. In fact I used it frequently until I integrated Log4R in the app. What is your setup (os/ruby/wxruby versions etc)? > How do you experts debug wxruby apps? Any help would be appreciated. As mentioned, Log4R is invaluable. I also sometimes use Florian Gross's breakpoint module [ruby-talk:111523].