From a17ea7b9890f0267458507fb15cbc2c6549d5339 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Wed, 16 Nov 2022 21:21:25 -0800 Subject: [PATCH] fix(pwsh): support additional debug prompt scenarios --- src/shell/scripts/omp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 405d803c..fc5f9414 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -292,7 +292,7 @@ Example: # for details about the trick to detect a debugging context, see these comments: # 1) https://github.com/JanDeDobbeleer/oh-my-posh/issues/2483#issuecomment-1175761456 # 2) https://github.com/JanDeDobbeleer/oh-my-posh/issues/2502#issuecomment-1179968052 - if (-not ((Get-PSCallStack).Location -join "").StartsWith("<")) { + if ($null -ne $PSDebugContext -or -not ((Get-PSCallStack).Location -join "").StartsWith("<")) { $script:PromptType = "debug" return }