Here is what I added to http://wiki.github.com/ironruby/ironruby. This works 
pretty well for me. If the paths are incorrect, feel free to update the wiki.

Debugging with Visual Studio
In the Debug tab of the Project properties for Ruby.Console.csproj, set the 
fields as follows:

 *   Start Action: For Ruby.Console.csproj, "Start project" should be enabled.
For any other project, "Start external program:" should be enabled and set to 
"c:\vsl\Merlin\Main\Bin\Debug\ir.exe"

 *   Start Options: "Command line arguments" should be set to the following for 
running the "supports /i for ignoring case" example of string\gsub_spec.rb:
-v -X:Interpret 
c:/vsl/Merlin/External/Languages/IronRuby/mspec/mspec/bin/mspec-run -e 
"supports /i for ignoring case" -fs -V -B 
c:/vsl/Merlin/External/Languages/IronRuby/mspec/default.mspec 
c:/vsl/Merlin/External/Languages/IronRuby/mspec/rubyspec/1.8/core/string/gsub_spec.rb
Hitting F5 should now run the single RubySpec example under VS


Thanks,
Shri

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jimmy Schementi
Sent: Wednesday, February 18, 2009 8:52 AM
To: [email protected]
Subject: Re: [Ironruby-core] Debugging rubyspecs

You can pass the spec file to mspec itself like:

mspec run core/io/popen_close

Then I make a call to "debugger" http://gist.github.com/61605, which breaks on 
a call to System::Diagnostics::Debugger when a debugger is attached to the app. 
Unfortunately this breaks in a Ruby method, so you have to jump up a couple CLR 
frames to get to the line directly after the "debugger" call, and I'm not sure 
of a way how to do that automatically. Anyway, this works great.

~js

From: [email protected] 
[mailto:[email protected]] On Behalf Of Pete Bacon Darwin
Sent: Wednesday, February 18, 2009 8:11 AM
To: 'Pete Bacon Darwin'; [email protected]
Subject: Re: [Ironruby-core] Debugging rubyspecs

The easiest way it appears is to stick a pause in the rubyspec of interest and 
attach to the process while it is waiting.  It does totally kill the computer 
performance while you are debugging (like minutes to step through each line!)
Pete

From: Pete Bacon Darwin [mailto:[email protected]]
Sent: Wednesday,18 February 18, 2009 15:19
To: '[email protected]'
Subject: Debugging rubyspecs

Anybody know how to run rubyspecs under the Visual Studio debugger?  If I just 
set the rubyspec file as the command line argument in the debug properties in 
VS then it just asks me to install mspec as a gem.
Pete
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to