Breakpoints in Text Files

Feb 11, 2011 at 8:24 PM

How is the technique of setting a breakpoint in a text file as demonstrated in the demo video achieved? Is this an F# exclusive trick?

Jun 23, 2011 at 11:46 PM

TickSpec generates and executes IL code at runtime using types from the System.Reflection.Emit namespace. The emitted code references lines from the source feature file using the ILGenerator.MarkSequencePoint method. This enables debugger integration. The code is in ScenarioGen.fs file.

Debugger integration can also be achieved using the CodeDOM to generate a code-behind file. The downsides to taking the CodeDOM code-behind approach is (a) increased compile times (b) adding noise to user search results (c) requiring additional Visual Studio integration.

Both approaches, Reflection.Emit and CodeDOM, can be achieved from most .Net languages, e.g. C#, F#, VB.Net etc.