Author Topic: Is anyone using ILSpy?  (Read 13895 times)

0 Members and 1 Guest are viewing this topic.

exmachina

  • Guest
Re: Is anyone using ILSpy?
« Reply #15 on: April 02, 2012, 11:29:35 AM »
Why does Visual Studio allow you to debug .NET framework code?

I do not know. If someone has an (real life) example , please send it.
Thanks.

TheMaster

  • Guest
Re: Is anyone using ILSpy?
« Reply #16 on: April 02, 2012, 03:21:11 PM »
Why does Visual Studio allow you to debug .NET framework code?

I do not know. If someone has an (real life) example , please send it.
Thanks.

Microsoft made the source available for debugging so that if you need to know what the framework is doing when you call one of its APIs, you can step into the source code to find out.

exmachina

  • Guest
Re: Is anyone using ILSpy?
« Reply #17 on: April 02, 2012, 05:11:37 PM »
What about pdb files and others files like this?. In any case, i respect your opinion but i do not understand what may be the purpose of debugging that:
Debugging System.Drawing.Graphics.DrawString
« Last Edit: April 02, 2012, 05:17:05 PM by exmachina »

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Is anyone using ILSpy?
« Reply #18 on: April 02, 2012, 07:34:32 PM »
Many reasons and on one hand you have people checking and testing your code for free.
 
Using your example lets say you keep getting a exception that your brush is null and you use a decompiler to look at code.
Code - C#: [Select]
  1.         public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
  2.         {
  3.             if (brush == null)
  4.             {
  5.                 throw new ArgumentNullException("brush");
  6.             }
  7.             if ((s != null) && (s.Length != 0))
  8.             {
  9.                 if (font == null)
  10.                 {
  11.                     throw new ArgumentNullException("brush");
  12.                 }
  13.                 GPRECTF layoutRect = new GPRECTF(layoutRectangle);
  14.                 IntPtr handle = (format == null) ? IntPtr.Zero : format.nativeFormat;
  15.                 int status = SafeNativeMethods.Gdip.GdipDrawString(new HandleRef(this, this.NativeGraphics), s, s.Length, new HandleRef(font, font.NativeFont), ref layoutRect, new HandleRef(format, handle), new HandleRef(brush, brush.NativeBrush));
  16.                 this.CheckErrorStatus(status);
  17.             }
  18.         }
  19.  

You tell microsoft and they can't reproduce it and you send them your code for creating a brush and they can't reproduce it.
 
I do not know if you caught it but I changed the exception for font null check (easily could happen by copying pasting and forgetting to change brush to font)
 
If you debug it you would have noticed that it really was your font that was null. I do not see how people can really say they know what there code is doing without debugging it.

exmachina

  • Guest
Re: Is anyone using ILSpy?
« Reply #19 on: April 02, 2012, 08:17:31 PM »
Maybe I have not understood well (sorry, always i have the same problem because i don't speack...etc), In my opinion:

1- I do not work for Microsoft, much less free. So i have no reason to find/debug their mistakes
2- 33 + 33 = 66. Otherwise the problem is the compiler or languaje implementation=>Look@point 1
3- At this level anyone can be distinguish what is his own fault/bug or that of others, so=>Look@point 1

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Is anyone using ILSpy?
« Reply #20 on: August 21, 2012, 05:24:16 PM »
I have not spent much time with it but at least looks cool, a visualizer plug-in for ILSpy.
 
ILSpy Plug-Ins
 
 

BlackBox

  • King Gator
  • Posts: 3770
Re: Is anyone using ILSpy?
« Reply #21 on: August 21, 2012, 06:22:59 PM »
I have not spent much time with it but at least looks cool, a visualizer plug-in for ILSpy.
 
ILSpy Plug-Ins

... That's pretty neat; I'm sure the Assembly Visualizer will come in handy as I progress with .NET development. :beer:
"How we think determines what we do, and what we do determines what we get."

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Is anyone using ILSpy?
« Reply #22 on: August 20, 2013, 02:03:24 AM »
Sorry for opening a oldish thread, but there's just been another release of such "free" inspector/decompiler:
dotPeek: http://www.jetbrains.com/decompiler/
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.