I see. I haven't tried it, but yes the trick will work.
It would be nice of vs.net can support this directly.
I heard that the longhorn version of windbg will support il debugging. Can
you confirm this ?
I did try the SOS extension for the current windbg, but find it not so
intuitive.
(I actually prefer to use windbg over vs.net for debugging).

thanks
-tony



From: Serge Lidin <[EMAIL PROTECTED]>
Reply-To: "Unmoderated discussion of advanced .NET topics."
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Single-stepping IL code
Date: Wed, 11 Aug 2004 11:08:42 -0700

Under VS debugger, you can single-step the code at native level, but not at
IL level. To achieve single-stepping at IL level, you need to do the
following trick (works with C# and VB apps, doesn't with most VC++ apps):
1) build C#/VB app, debug version;
2) ildasm it with /source option (original source lines will be put into
disassembly as comments);
3) ilasm the disassembly with /debug option (new EXE/DLL and PDB will bind
the IL code to the disassembly's text rather than to the original C#/VB
text, but you have the original C#/VB text embedded in the disassembly);
4) run new executable under VS debugger.

Thanks,
Serge

-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Tony Hal
Sent: Monday, August 09, 2004 10:30 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] Single-stepping IL code


I am new to VC.NET and have tried the whidbey version for a few times. I can't seem to single-step app (written using C#) at the IL level using VC.NET studio. I probably miss something here, so if someone knows how to do this, please let me know. Furthermore, is it also possible single-step it at the native code (x86) level ?

Either one would give a great learning tool on how hi-level codes are
generated in .NET.

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

=================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to