From: Leslie Viljoen Date: 2007-05-26T05:26:10+09:00 Subject: Re: Ruby - Debugging ------=_Part_115715_2166408.1180124762171 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/25/07, Leslie Viljoen wrote: > > > > On 5/25/07, Jorge Domenico Bucaran Romano wrote: > > > > > > (rdb:1) b c:\users\jbucaran\desktop\demo2.rb > > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:compile erro= r > > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10: syntax > > error, unexpe > > cted $undefined, expecting tSTRING_CONTENT or tSTRING_DBEG or > > tSTRING_DVAR or tS > > TRING_END > > c:\users\jbucaran\desktop\demo2 > > ^ > > (rdb:1) Set breakpoint 1 at c:\users\jbucaran\desktop\demo2.rb:1 > > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10: warning: > > parenthesiz > > e argument(s) for future version > > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:compile erro= r > > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10: syntax > > error, unexpe > > cted tIDENTIFIER, expecting $end > > Set breakpoint 1 at c:\users\jbucaran\desktop\demo2.rb:1 > > ^ > > (rdb:1) > > > It looks to me like the debugger is getting confused by the colon after C > drive. > The usage for the 'b' command: b[reak] [file:|class:] > See? You can specify a file and then a colon and the class etc. but the > debugger is not expecting a colon in the path. > > Try just "b 1" to set a breakpoint on line 1. > > Les > Some tests show that this doesn't help you much. And I see ruby-breakpoint is currently broken for Windows... sorry! To be honest, I have never really used the debugger in Ruby, and most peopl= e I know don't use it either - perhaps because of problems like this. I use ruby-breakpoint from time to time on Linux. Other than that I find that a few small unit tests and the occasional 'p variable; exit' somewhere in my code are all I need to figure out what the problem is. Les --=20 If you could create a machine that copies hamburgers =97 you put one hambur= ger in and two equally good hamburgers come out the other side =97 it would be unethical not to do so and make it freely available. ------=_Part_115715_2166408.1180124762171--