fix(pwsh): use correct dbg prompt logic

resolves #5153
This commit is contained in:
Jan De Dobbeleer 2024-06-24 08:34:16 +02:00 committed by Jan De Dobbeleer
parent 2a9104f22b
commit 197eaaa334

View file

@ -359,7 +359,8 @@ 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 ($null -ne $PSDebugContext -or -not ((Get-PSCallStack).Location -join "").StartsWith("<")) {
# 3) https://github.com/JanDeDobbeleer/oh-my-posh/issues/5153
if ($Host.Runspace.Debugger.InBreakpoint) {
$script:PromptType = "debug"
return
}