-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom prompt function no longer sees PSDebugContext
#3980
Custom prompt function no longer sees PSDebugContext
#3980
Comments
Hmm this is how I've always done it too, I've noted my debug prompt has been wonkly lately. Good catch! I'll see if I can repro this consistently. |
I'm pretty sure this is because, as part of the effort to fix #873, we made an allowlist for which commands go through |
The first thing I noticed was the fix to 873, my history number isn't incrementing in steps of a dozen any more, which is a sizable win :-) If we can just get the prompt right that will be great. |
PSDebugContext
Good stuff, thanks @andschwa |
Prerequisites
Summary
I have my own prompt function. For many years it has had
This no longer works ... And if I define a function
before running the code that hits the break point
debugging
returns false even though I can see$PSDebugContext
interactively. But if I define the function while the debugger is active it returns true. It looks like a scopes thing but after spending a while trying to figure out how to see it , I've got nowhere. What is the correct way to detect the debugger now?PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
Paste the above at the prompt and run something with a breakpoint set and debugger in Interactive session mode.
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: