diff --git a/src/PowerShellEditorServices/Session/Host/EditorServicesPSHostUserInterface.cs b/src/PowerShellEditorServices/Session/Host/EditorServicesPSHostUserInterface.cs index 0935c9406..e5006f0f7 100644 --- a/src/PowerShellEditorServices/Session/Host/EditorServicesPSHostUserInterface.cs +++ b/src/PowerShellEditorServices/Session/Host/EditorServicesPSHostUserInterface.cs @@ -642,8 +642,8 @@ private async Task WritePromptStringToHost() .OfType() .FirstOrDefault() ?? "PS> "; - // Add the [DBG] prefix if we're stopped in the debugger - if (this.powerShellContext.IsDebuggerStopped) + // Add the [DBG] prefix if we're stopped in the debugger and the prompt doesn't already have [DBG] in it + if (this.powerShellContext.IsDebuggerStopped && !promptString.Contains("[DBG]")) { promptString = string.Format(