Step-by-step debugging with Silverlight and IronRuby

April 11, 2008

I struggled a bit while preparing my Silverlight and IronRuby article for the French magazine Programmez so I’ll share those tips here.

Here are the required elements to achieve step-by-step debugging when working in IronRuby Silverlight:

  • Visual Studio 2008 RTM (trial version is ok)
  • Silverlight 2 Visual Studio Tools
  • The latest DLLs from the Dynamic Silverlight SDK, placed under your app folder (or under the Chiron /bin folder)

Then add the following to your HTML file:

<param name="initParams"
       value="debug=true, reportErrors=errorLocation" />

To actually debug, here are the required steps:

  • open your Ruby file in Visual Studio
  • enable the breakpoint
  • attach the debugger to your browser window process
  • go back to the browser and hit F5

Many thanks to Jimmy Schementi for helping out on the ironruby-core mailing list.

Update (2025): Silverlight was discontinued by Microsoft in 2021. This article is preserved as a historical record of using dynamic languages (IronRuby) inside Silverlight — an early experiment in cross-language .Net development.