Welcome to MSDN Blogs Sign in | Join | Help

January 2006 - Posts

Fun with yield, generics, and foreach

We all know that you can use C#'s foreach keyword to iterate through all items in an enumeration. Suppose you have a list of mixed-types: object [] list = new object [] {1,2, "abc" , 5f, "def" }; Trying to enumerate through the strings like this would
Posted by jmstall | 15 Comments
Filed under:

MDbg UI Threading, round 2

The STA/MTA threading problem is (hopefully) fixed in the latest MDbg winforms Gui . (which also has some cool new features, including an IL disassembly window ) The original solution implemented in the original GUI (described here ) had the problem that
Posted by jmstall | 2 Comments
Filed under:

You can't do Edit-and-Continue with Interop-debugging on.

Somebody asked on the forums about Edit-and-Continue (EnC) in mixed mode . You can't use managed EnC with mixed-mode ( interop ) debugging enabled. This is a limitation of the CLR Debugging Services. Both Interop-debugging and EnC are complicated features;

When More is less

Sometimes more is less. You may do more work to add a feature that turns out to get in the customers way. Here are some examples we've hit in the debugger-space: Example 1: Funceval : When you do a func-eval (via ICorDebugEval::Call*Function), the CLR
Posted by jmstall | 1 Comments
Filed under:

What to do with a feature that only works 90% of the time?

Imagine when you're designing a feature if there was an operation that was very useful 90% of the time; but the other 10% of the time it was provably and innately unsafe (either crashed, deadlocked, or gave back garbage). By "innately unsafe", I mean
Posted by jmstall | 1 Comments
Filed under: , ,

Mdbg IronPython Extension updated for Beta 1

You probably heard that Iron Python Beta 1 was released . It has a small (but very worthy) breaking change, and I've updated the MDbg-IronPython extension accordingly. I updated it previously for 0.9.3 . The changes are related to redirecting the python
Posted by jmstall | 1 Comments
Filed under:

Multiple steppers on 1 thread and other trivia

ICorDebug has a nicely abstracted "Stepper" object, via ICorDebugStepper (I talked more about that here ). You setup a stepper object (via CreateStepper), resume the process, and then get an aysnchronous "StepComplete" debug event when the stepper is

Oh, yeah!

As a ship-gift for shipping VS2005 , I got my copy of VS2005 "Everything Edition" (Ok, it's not actually called that). I'm very excited about this. I've installed it on my home machine and am looking forward to using it for my various pet projects. It's
Posted by jmstall | 1 Comments

Sudoku Solver and Omniscient debugging

Let me make an analogy between debugging a program and solving a Sudoku. Sudoku is a number-crossword type of game where you fill in numbers in a 9x9 grid such that each row, column, and 3x3 box contain each of the numbers 1...9. The grid is pre-initialized
Posted by jmstall | 4 Comments
Filed under:

XML Diff Tool

Here's a webpage (courtesy of ASP+) that compares two XML files (eg, Xml Diff, Xml Patch). It also includes free downloadable version that you can run offline. As more and more things use XML, these sort of tools become more necessary. For example, I
Posted by jmstall | 3 Comments

Click Once rocks.

I've been reading up on ClickOnce and it is a very useful thing for easily deploying simple winforms app over the web (like an applet). This MSDN article followed by this FAQ are great overviews to understand it. It also helps having Shawn Farkas only
Posted by jmstall | 4 Comments
Filed under:

PSA: Pinvokes may be 100x slower under the debugger.

I need to make an embarrassing public service announcement (PSA): Pinvokes are 100x slower under the debugger in VS2005 / Whidbey. For example, this is the issue that came up here . It may also manifest as your app "hanging" under the debugger w/ 100%
Posted by jmstall | 12 Comments
Filed under:

You need Source Files to do source-level debugging

I've had several people ask me "if my managed app and pdb are both in memory, can the managed debugger get the source from the debuggee's memory too?". This is a very reasonable question, but the answer here is "no". It comes up in different scenarios:
Posted by jmstall | 3 Comments

Trivial RSS Writer

Recently, I've been going through the standard fatherhood ritual of trying to setup of a webpage to share out photos of my kid. This naturally involves creating an RSS feed so that family can subscribe to the new image list. I wanted to be able to write
Posted by jmstall | 3 Comments
Filed under: ,

Writing colorized text to RichTextBox

You may have noticed I got carried away making everything a RichTextBox in the latest MDbg GUI . That's because I just like having some color in the world, and RichTextBox makes it very easy to colorize text. Here's a simple function to write a string
Posted by jmstall | 0 Comments
Filed under:

Debugabbility with Roundtripping Assemblies

I've gotten several questions about debugabbility IL round-tripping. Round-tripping is where you decompile an app (perhaps via ILDasm), potentially edit the IL, and then recompile it (perhaps via ILAsm). This is the backbone for rewriting an assembly,

Partition of ICorDebug

The ICorDebug API (the API for debugging managed apps) is about 70 total interfaces. Here is how I'd group the interfaces together, along with my random comments about how various interfaces fit into the big picture. A quick comment about interface versioning:

Happy New Year!

Happy New year! My wife took our Christmas tree down, so I guess that's also my que to take my Christmas blog decorations down. Happy new year everybody.
Posted by jmstall | 2 Comments
Filed under:
 
Page view tracker