# Debug IronRuby in Silverlight

**URL:** <https://www.ruby-forum.com/t/debug-ironruby-in-silverlight/181429>\
**Category:** IronRuby\
**Created:** [January 11, 2010, 9:27pm UTC](https://www.ruby-forum.com/t/debug-ironruby-in-silverlight/181429 "2010-01-11T21:27:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randall\_Sutton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85e7bf/32.png) [@Randall\_Sutton](https://www.ruby-forum.com/u/Randall_Sutton)\
**Post date:** [January 11, 2010, 9:27pm UTC](https://www.ruby-forum.com/t/debug-ironruby-in-silverlight/181429/1 "2010-01-11T21:27:27Z")

</div>

Ok. I give up. I cannot for the life of me getting a simple IronRuby  
Silverlight project to debug. I am using VS2008 SP1 and the Silverlight  
3 Tools.

These are my steps:

- Create website using chiron.
- Set the initparams to debug=true,reportErrors=errorLocation
- F5  
These last steps I have tried in every order under the sun.
- Set a breakpoint in my app.rb file
- Attach to browser
- Refresh browser

No matter what I do I always get that empty circle with a question mark  
for my breakpoint like the symbols never get loaded. I have tried using  
both Casini and Chiron when trying to be debug, but nothing works. I  
also tried selected the Silverlight checkbox in the website settings for  
the debugging and still nothing.

Please help.

Thanks,  
Randall

---

<div class="post-metadata">

**Author:** ![Randall\_Sutton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85e7bf/32.png) [@Randall\_Sutton](https://www.ruby-forum.com/u/Randall_Sutton)\
**Post date:** [January 11, 2010, 10:59pm UTC](https://www.ruby-forum.com/t/debug-ironruby-in-silverlight/181429/2 "2010-01-11T22:59:56Z")

</div>

Randall,

It’s a bug; we were not emitting PDBs in Silverlight, by mistake  
([http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3423](http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3423)). This  
will be checked in shortly and fixed in the next release.

If you want to fix this yourself now, just remove the “#if !SILVERLIGHT”  
and corresponding “#endif” from  
RubyScriptCode.CompileLambda([http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyScriptCode.cs#L124](http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyScriptCode.cs#L124)),  
then rebuild IronRuby for Silverlight:

msbuild Merlin/Main/Languages/Ruby/Ruby.sln  
/p:Configuration=“Silverlight Debug” /p:SilverlightPath=“C:\Program  
Files\Microsoft Silverlight\3.0.40818.0”

(make sure that path to Silverlight is correct for you).

~js
