internal void TraceLine(IScriptExtent extent) { string message = PositionUtilities.BriefMessage(extent.StartScriptPosition); InternalHostUserInterface uI = (InternalHostUserInterface)this._context.EngineHostInterface.UI; ActionPreference preference = this._context.PSDebugTraceStep ? ActionPreference.Inquire : ActionPreference.Continue; uI.WriteDebugLine(message, ref preference); if (preference == ActionPreference.Continue) { this._context.PSDebugTraceStep = false; } }
internal static void TraceLine(ExecutionContext context, ParseTreeNode statement) { if (statement == null || !context.ShouldTraceStatement || statement.NodeToken == null) { return; } string message = statement.NodeToken.Position(false); InternalHostUserInterface ui = (InternalHostUserInterface)context.EngineHostInterface.UI; ActionPreference preference = context.StepScript ? ActionPreference.Inquire : ActionPreference.Continue; ui.WriteDebugLine(message, ref preference); if (preference != ActionPreference.Continue) { return; } context.StepScript = false; }