From: David Naseby Date: 2004-09-17T17:01:17+09:00 Subject: Re: Debugging wxruby programs. > From: R. Cheung [mailto:cheungr@ecid.cig.mot.com] > 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, 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). How do you experts debug > wxruby apps? Any help would be appreciated. Rename the file from *.rbw to *.rb, as rubyw.exe will cause ugly segfaults if anything in it tries to write to stdout. Then run the file from the command prompt with ruby .rb. Then you can put print statements in to your hearts content for debugging. David http://homepages.ihug.com.au/~naseby/