[Ironruby-core] IronRuby.Rack how to debug?

Shri Borde Shri.Borde at microsoft.com
Mon Mar 15 15:08:22 EDT 2010


In that case, windbg might help. It’s potentially a bit more robust since it offers fewer features. Btw, I often disable “Tools | Options | Debugging | Enable property evaluation and implicit function calls” in Visual Studio so that it does not try to implicitly run code in the process being debugged when you hit a breakpoint or step over a line of code. If I need to evaluate some property when stopped at a breakpoint, I do that explicity using the Immediate Window.

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero
Sent: Monday, March 15, 2010 11:49 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] IronRuby.Rack how to debug?

I can attach and step through but just when the interesting bit occurs visual studio takes a hike

but will try this again later
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Web: http://whiterabbitconsulting.eu - http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
Microsoft IronRuby/C# MVP

On Mon, Mar 15, 2010 at 7:18 PM, Shri Borde <Shri.Borde at microsoft.com<mailto:Shri.Borde at microsoft.com>> wrote:
The issue just seems to be that the process is dying before Visual Studio can properly attach. Ivan, try using " System::Diagnostics::Debug.assert false" which will pop up a dialog box, thus blocking the thread, but without using the "int 3" x86 instruction as System::Diagnostics::Debugger.break would. The latter might cause some issues.

Also, could there be any issue with the fact that ASP.Net is running a service? Some dialog boxes might be getting hidden since services run in their own hidden workspace/workstation (I think)

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org>] On Behalf Of Cory Foy
Sent: Sunday, March 14, 2010 11:25 PM
To: ironruby-core at rubyforge.org<mailto:ironruby-core at rubyforge.org>
Subject: Re: [Ironruby-core] IronRuby.Rack how to debug?

Ivan Porto Carrero wrote:
> I am unable to debug the application though. If I put
> System::Diagnostics::Debugger.break somewhere it will correctly break there
> but eventually visual studio (2008 and 2010) will just get tired of it and
> claim they have to quit.  I've seen that the debug windows gives me a lot of
> information and I was hoping that there would be some useful information
> there for me but because visual studio quits right at the interesting moment
> I'm unable to figure out what's going on as nothing is printed in the
> sysinternals debugvw application.

You may also want to try WinDBG with the SOS extension. Here's slides
with code and examples on using WinDBG to debug .NET applications:

http://www.slideshare.net/CoryFoy/debugging-net-applications-with-windbg

What I'd try is using the File menu to attach to the process, then when
it breaks typing in ".loadby sos mscorwks". Next type in "sxe clr" and
then "g". It will now break on all CLR exceptions. You can type
"!printexception" to see the exception details when it breaks, and "g"
to make it go again. You can also type "!help" to see all of the SOS
commands.

--
Cory Foy
http://www.coryfoy.com
http://twitter.com/cory_foy
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100315/5bb88bb3/attachment-0001.html>


More information about the Ironruby-core mailing list