You have to explicitly tell the DLR to generate "debuggable" code.

ScriptRuntime env = ScriptRuntime.Create(setup);
env.GlobalOptions.DebugMode = true;
ScriptEngine MyEngine = env.GetEngineByFileExtension("rb");
// ...
MyEngine.CreateScriptSourceFromFile("MyRuby.rb").Execute(MyScope);

Disclaimer: compiled by brain =P

~js

On 3/31/08 12:44 AM, "Robert Brotherus" <[EMAIL PROTECTED]> wrote:

I have been embedding IronRuby to our WPF C# application, so I am not
starting rbx but rather doing calls like:

MyEngine.CreateScriptSourceFromFile("MyRuby.rb").Execute(MyScope);

Any hope for me to get to use the nice new debugging goodies? :-) I did
install the silverlight VS extension, included MyRuby.rb to my C#
project and placed breakpoint there, but that did not seem to be enough
to have execution stopping there :-(

Robert Brotherus


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tomas Matousek
Sent: 28. maaliskuuta 2008 4:25
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] debugging IR

"It should just work" means you open IronRuby.sln, the Ruby source file
you want to debug, place a breakpoint and run Ruby.Console project with
the source file path on the command line.

Tomas

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Lam (DLR)
Sent: Thursday, March 27, 2008 6:47 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] debugging IR

Jeff Siebold:

> I've been following IR since pre-alpha and have enjoyed being able to
> play with .NET within Ruby. Since the beginning, the one thing that
> I've been most looking forward to has been debugging. I've seen that
> some debugging might already be in the current SVN rev (a blog post by

> John & I think revision notes too). Is this true? If so, how can I
> debug ruby code? I'm using VS 2008.

Debugging support works today in Silverlight as long as you have the
Silverlight tools for VS installed. It should just work on desktop CLR
as well.

Now 'just work' means that our source spans aren't defined precisely
which means that stepping over individual statements and in conditionals
is, um, weird. But it does hit breakpoints and show locals and the call
stack correctly, but I wouldn't really use it for real until we fix how
we generate sequence points.

Thanks,
-John

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to