I’ve just got in the mail the new Advanced .NET Debugging book by Mario Hewardt which I had the pleasure of reviewing prior to its publication (I sure hope my comments helped a bit, if at all 🙂 ).

The book covers the internals of .NET, tools that can help you debug and solve issues such as, WinDbg and PowerDBG as well as cover specific and common issues that a lot of other developers encountered (heap corruption, dead locks, etc)

The book is well written and structured and I would recommend it to any .NET developer who wish to better understand how .NET works under the hood, as well as gain the necessary tools (and it IS necessary to use these tools 🙂 ) to debug and solve real world problems that cannot be resolved with regular debuggers such as Visual Studio.

The book fills a niche that was left empty for far too long. When I started this blog there was almost no knowledge online about advanced .NET debugging. I’m happy that Mario was the one to bring all of this information in a structured book.

Get the book here:

You might also want to check our Mario’s previous book, Advanced Windows Debugging which also talked about the use of WinDbg and other tools but in a native context. It’s also a great book to complement the .NET side of things.

Get the book and debug without fear! 🙂

  • sakopov

    This is a good book but it has errors, and some things don’t seem to work as described. I did send an email to the author with the list of issues but haven’t heard from him. This is a pure practitioner’s book, – not a book of concepts, and one would expect the sample code to be correct but it is not. I am going to copy the list of issues that I sent to the author in here, and maybe someone will be able to point them out to Mario:

    • Page 201 – setting the “!bpmd –md 001e3250” doesn’t work. Cannot break at this point. Tried using “!mx 04codegen!*add*” and then “!mbm *!Advanced.NET.Debugging.Chapter4.CodeGen+Add 0” and that didn’t work either.
    • Page 234 – there is no such sample code in the source folder Chapter5, or in the binaries.
    • Page 259 has a typo: “The next object begins at address 0x1c65928”, should be: 0x1c65968
    • Page 301 – “Event is waiting” not clear. Events could be in signaled and nonsignaled state, so, what does the waiting state mean? Does it mean that it is in signaled state and is waiting to be reset?
    • Page 303 – the command line “!handle 238 8” – not clear what the last ‘8’ means? I assume this is just a typo.
    • Page 336 – [DllImport(“06Native.dll”)] – typo should be 05Native.dll.
    • Page 350 – 05Native.cpp doesn’t have Myfunc() function. Needed to create one myself.
    • Page 352 – after typing “dv (NOTE: I am using WinDbg) ”, I got this message:
    o Breakpoint 0 hit
    o eax=00953044 ebx=00181e28 ecx=00199a88 edx=00000000 esi=0012f3f8 edi=0012f69c
    o eip=10011580 esp=0012f3c8 ebp=0012f3e0 iopl=0 nv up ei pl zr na pe nc
    o cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
    o 05Native!MyFunc:
    o 10011580 55 push ebp
    o 0:000> dv
    o Unable to enumerate locals, HRESULT 0x80004005
    o Private symbols (symbols.pri) are required for locals.
    • Page 361 in WinDbg after I typed “!lines” command, I received this message:
    o !lines
    o Line number information will not be loaded
    o *** WARNING: Unable to verify checksum for D:\Downloads\Books\AdvancedDotnetDebugging\Chapter7\Sig5Native.dll
    • Page 365 – 05Native.cpp doesn’t have AsyncProcess function defined. This file really needs to be updated. The 05Native.dll in the Binaries folder also doesn’t seem to have this function.

  • PoorMSDev

    Horrible book, Author never wrote a book and not even understandable articles, he assumes too many things for reader… Pathetic book

  • It is a really useful book. There are many solutions to common .net problems. I reccomend it to everybody.

  • Just like any other published material, this book has gray areas too. Debugging is quite a complex field, which results to varied perceptions about this book. Hmm… Some may find this book effective, while others may think that it requires a lot of improvement.