Skip to content

Instantly share code, notes, and snippets.

@jschementi
Created February 10, 2009 21:34
Show Gist options
  • Save jschementi/61605 to your computer and use it in GitHub Desktop.
Save jschementi/61605 to your computer and use it in GitHub Desktop.
debugger method
#
# IronRuby ruby-debug-like-debugger call for things that
# support System::Diagnostics::Debugger, like Visual Studio
#
def debugger
require 'mscorlib'
System::Diagnostics::Debugger.break if System::Diagnostics::Debugger.launch
end
#
# if you attach Visual Studio to an IronRuby process, and
# call this method, Visual Studio will break at the debugger line
#
def usage
puts "before debugger"
debugger
puts "after debugger"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment