/// <summary> /// Generates CIL for the statement. /// </summary> /// <param name="generator"> The generator to output the CIL to. </param> /// <param name="optimizationInfo"> Information about any optimizations that should be performed. </param> public override void GenerateCode(ILGenerator generator, OptimizationInfo optimizationInfo) { // Generate code for the start of the statement. var statementLocals = new StatementLocals(); GenerateStartOfStatement(generator, optimizationInfo, statementLocals); // Inserts a breakpoint into the IL. generator.Breakpoint(); // When the debugger stops, it stops at the first instruction after the breakpoint. By // inserting a no-op operation the debugger will highlight the "debugger" statement // instead of the statement after the "debugger" statement. generator.NoOperation(); // Generate code for the end of the statement. GenerateEndOfStatement(generator, optimizationInfo, statementLocals); }