Skip to content

Assertion failure in type inference while using completions #15885

@rjmholt

Description

@rjmholt

Prerequisites

Steps to reproduce

trap { wait-debugger }
throw 'bad'

In the debugger:

> $_.Ex<Tab>

Expected behavior

Completes to $_.Exception

Actual behavior

[DBG]: PS C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell>> $_.ExProcess terminated. Assertion failed.
caller to verify arguments
   at System.Management.Automation.Diagnostics.Assert(Boolean condition, String whyThisShouldNeverHappen, String detailMessage) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\utils\assert.cs:line 202
   at System.Management.Automation.Diagnostics.Assert(Boolean condition, String whyThisShouldNeverHappen) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\utils\assert.cs:line 134
   at System.Management.Automation.Language.AstSearcher.FindAll(Ast ast, Func`2 predicate, Boolean searchNestedScriptBlocks) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\AstVisitor.cs:line 410
   at System.Management.Automation.TypeInferenceVisitor.InferTypeFrom(VariableExpressionAst variableExpressionAst, List`1 inferredTypes) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\TypeInferenceVisitor.cs:line 1934
   at System.Management.Automation.TypeInferenceVisitor.System.Management.Automation.Language.ICustomAstVisitor.VisitVariableExpression(VariableExpressionAst ast) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\TypeInferenceVisitor.cs:line 630
   at System.Management.Automation.Language.VariableExpressionAst.Accept(ICustomAstVisitor visitor) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\ast.cs:line 9252
   at System.Management.Automation.TypeInferenceContext.InferType(Ast ast, TypeInferenceVisitor visitor) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\TypeInferenceVisitor.cs:line 400
   at System.Management.Automation.AstTypeInference.InferTypeOf(Ast ast, TypeInferenceContext context, TypeInferenceRuntimePermissions evalPersmissions) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\parser\TypeInferenceVisitor.cs:line 103
   at System.Management.Automation.CompletionCompleters.CompleteMember(CompletionContext context, Boolean static) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CompletionCompleters.cs:line 5637
   at System.Management.Automation.CompletionAnalysis.GetResultForIdentifier(CompletionContext completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CompletionAnalysis.cs:line 2021
   at System.Management.Automation.CompletionAnalysis.GetResultHelper(CompletionContext completionContext, Int32& replacementIndex, Int32& replacementLength, Boolean isQuotedString) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CompletionAnalysis.cs:line 419
   at System.Management.Automation.CompletionAnalysis.GetResults(PowerShell powerShell, Int32& replacementIndex, Int32& replacementLength) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CompletionAnalysis.cs:line 380
   at System.Management.Automation.CommandCompletion.CompleteInputImpl(Ast ast, Token[] tokens, IScriptPosition positionOfCursor, Hashtable options) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CommandCompletion.cs:line 579
   at System.Management.Automation.CommandCompletion.CompleteInput(String input, Int32 cursorIndex, Hashtable options) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CommandCompletion.cs:line 102
   at CallSite.Target(Closure , CallSite , Type , String , Int32 , Hashtable )
   at System.Management.Automation.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\DynamicInstructions.Generated.cs:line 218
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\Interpreter.cs:line 105
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\LightLambda.Generated.cs:line 81
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\runtime\CompiledScriptBlock.cs:line 2350
   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\runtime\CompiledScriptBlock.cs:line 2287
   at System.Management.Automation.CommandProcessorBase.Complete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 596
   at System.Management.Automation.CommandProcessorBase.DoComplete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 642
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 603
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 514
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 400
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 591
   at System.Management.Automation.Runspaces.LocalPipeline.StartPipelineExecution() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 236
   at System.Management.Automation.Runspaces.PipelineBase.CoreInvoke(IEnumerable input, Boolean syncCall) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\pipelinebase.cs:line 543
   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\pipelinebase.cs:line 385
   at System.Management.Automation.Runspaces.Pipeline.Invoke() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\Pipeline.cs:line 528
   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 5630
   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4607
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4788
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4536
   at System.Management.Automation.PowerShell.Invoke[T](IEnumerable input, IList`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 2750
   at System.Management.Automation.PowerShell.InvokeWithDebugger(IEnumerable`1 input, IList`1 output, PSInvocationSettings settings, Boolean invokeMustRun) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 2247
   at System.Management.Automation.ScriptDebugger.ProcessCommand(PSCommand command, PSDataCollection`1 output) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 2373
   at System.Management.Automation.CommandCompletion.ProcessCompleteInputCommand(Command cmd, Debugger debugger) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CommandCompletion.cs:line 410
   at System.Management.Automation.CommandCompletion.CompleteInputInDebugger(String input, Int32 cursorIndex, Hashtable options, Debugger debugger) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CommandCompletion.cs:line 351
   at System.Management.Automation.CommandCompletion.CompleteInput(String input, Int32 cursorIndex, Hashtable options, PowerShell powershell) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandCompletion\CommandCompletion.cs:line 163
   at Microsoft.PowerShell.PSConsoleReadLine.<>c__DisplayClass25_0.<Microsoft.PowerShell.Internal.IPSConsoleReadLineMockableMethods.CompleteInput>b__0() in Microsoft.PowerShell.PSReadLine2.dll:token 0x60004a0+0x0
   at PlatformWindows.CallPossibleExternalApplication[T](Func`1 func) in Microsoft.PowerShell.PSReadLine2.dll:token 0x600000d+0x1f
   at Microsoft.PowerShell.PSConsoleReadLine.CallPossibleExternalApplication[T](Func`1 func) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000e3+0x25
   at Microsoft.PowerShell.PSConsoleReadLine.Microsoft.PowerShell.Internal.IPSConsoleReadLineMockableMethods.CompleteInput(String input, Int32 cursorIndex, Hashtable options, PowerShell powershell) in Microsoft.PowerShell.PSReadLine2.dll:token 0x600002b+0x30
   at Microsoft.PowerShell.PSConsoleReadLine.GetCompletions() in Microsoft.PowerShell.PSReadLine2.dll:token 0x600003a+0x40
   at Microsoft.PowerShell.PSConsoleReadLine.Complete(Boolean forward) in Microsoft.PowerShell.PSReadLine2.dll:token 0x600003b+0x0
   at Microsoft.PowerShell.PSConsoleReadLine.TabCompleteNext(Nullable`1 key, Object arg) in Microsoft.PowerShell.PSReadLine2.dll:token 0x600002c+0x0
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000e5+0xb6
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop() in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000e2+0x53
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000e1+0x92
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics) in Microsoft.PowerShell.PSReadLine2.dll:token 0x60000e0+0x0
   at CallSite.Target(Closure , CallSite , Type , Object , Object )
   at System.Management.Automation.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\DynamicInstructions.Generated.cs:line 192
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\Interpreter.cs:line 105
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\LightLambda.Generated.cs:line 81
   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\ScriptCommandProcessor.cs:line 547
   at System.Management.Automation.DlrScriptCommandProcessor.Complete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\ScriptCommandProcessor.cs:line 425
   at System.Management.Automation.CommandProcessorBase.DoComplete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 642
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 603
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 514
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 400
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 591
   at System.Management.Automation.Runspaces.LocalPipeline.StartPipelineExecution() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 236
   at System.Management.Automation.Runspaces.PipelineBase.CoreInvoke(IEnumerable input, Boolean syncCall) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\pipelinebase.cs:line 543
   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\pipelinebase.cs:line 385
   at System.Management.Automation.Runspaces.Pipeline.Invoke() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\Pipeline.cs:line 528
   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 5630
   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4607
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4788
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 4536
   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 2431
   at System.Management.Automation.PowerShell.Invoke() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\PowerShell.cs:line 2308
   at Microsoft.PowerShell.ConsoleHostUserInterface.TryInvokeUserDefinedReadLine(String& input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHostUserInterface.cs:line 2209
   at Microsoft.PowerShell.ConsoleHostUserInterface.ReadLineWithTabCompletion(Executor exec) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHostUserInterface.cs:line 1970
   at Microsoft.PowerShell.ConsoleHost.InputLoop.Run(Boolean inputLoopIsNested) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHost.cs:line 2508
   at Microsoft.PowerShell.ConsoleHost.InputLoop.RunNewInputLoop(ConsoleHost parent, Boolean isNested) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHost.cs:line 2343
   at Microsoft.PowerShell.ConsoleHost.EnterNestedPrompt() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHost.cs:line 1037
   at System.Management.Automation.Internal.Host.InternalHost.EnterNestedPrompt(InternalCommand callingCommand) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\InternalHost.cs:line 334
   at System.Management.Automation.Internal.Host.InternalHost.EnterNestedPrompt() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\InternalHost.cs:line 214
   at Microsoft.PowerShell.ConsoleHost.EnterDebugMode() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHost.cs:line 2273
   at Microsoft.PowerShell.ConsoleHost.OnExecutionSuspended(Object sender, DebuggerStopEventArgs e) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.ConsoleHost\host\msh\ConsoleHost.cs:line 2228
   at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T eventArgs) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\utils\ExtensionMethods.cs:line 20
   at System.Management.Automation.Debugger.RaiseDebuggerStopEvent(DebuggerStopEventArgs args) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 467
   at System.Management.Automation.ScriptDebugger.OnDebuggerStop(InvocationInfo invocationInfo, List`1 breakpoints) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 1851
   at System.Management.Automation.ScriptDebugger.StopOnSequencePoint(FunctionContext functionContext, List`1 breakpoints) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 2077
   at System.Management.Automation.ScriptDebugger.OnSequencePointHit(FunctionContext functionContext) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 1544
   at System.Management.Automation.ScriptDebugger.Break(Object triggerObject) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\debugger\debugger.cs:line 2528
   at Microsoft.PowerShell.Commands.WaitDebuggerCommand.EndProcessing() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\Microsoft.PowerShell.Commands.Utility\commands\utility\EnableDisableRunspaceDebugCommand.cs:line 524
   at System.Management.Automation.Cmdlet.DoEndProcessing() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\cmdlet.cs:line 187
   at System.Management.Automation.CommandProcessorBase.Complete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 596
   at System.Management.Automation.CommandProcessorBase.DoComplete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 642
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 603
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 514
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\runtime\Operations\MiscOps.cs:line 498
   at <ScriptBlock><trap>(Closure , FunctionContext )
   at System.Management.Automation.ExceptionHandlingOps.ProcessTraps(FunctionContext funcContext, RuntimeException rte) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\runtime\Operations\MiscOps.cs:line 1767
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\runtime\Operations\MiscOps.cs:line 1650
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\CallInstruction.Generated.cs:line 504
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\ControlFlowInstructions.cs:line 358
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\Interpreter.cs:line 105
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\interpreter\LightLambda.Generated.cs:line 81
   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\ScriptCommandProcessor.cs:line 547
   at System.Management.Automation.DlrScriptCommandProcessor.Complete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\ScriptCommandProcessor.cs:line 425
   at System.Management.Automation.CommandProcessorBase.DoComplete() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\CommandProcessorBase.cs:line 642
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 603
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\pipeline.cs:line 514
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 400
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 591
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProcImpersonate() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 547
   at System.Management.Automation.Runspaces.PipelineThread.WorkerProc() in C:\Users\Robert Holt\Documents\Dev\Microsoft\PowerShell\src\System.Management.Automation\engine\hostifaces\LocalPipeline.cs:line 1220
   at System.Threading.Thread.StartHelper.Callback(Object state) in System.Private.CoreLib.dll:token 0x600288d+0x0
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in System.Private.CoreLib.dll:token 0x6002a2d+0x40
   at System.Threading.Thread.StartCallback() in System.Private.CoreLib.dll:token 0x600280f+0xe

Error details

No response

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.8
PSEdition                      Core
GitCommitId                    7.2.0-preview.8
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions