-
Notifications
You must be signed in to change notification settings - Fork 512
Different Preview Behavior for debugging #2289
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
Comments
I wonder if this is a semantic issue for us. In most languages, leaving the debugger means "detach the debugger and allow the program to continue", but in PowerShell I think the norm is "end execution of the program I'm debugging". If that's the case, the solution is to get the script to terminate immediately in the detach handler. |
To be honest with the way PowerShell behaves I'm not sure leaving it as it is a good idea. Because if I want to continue I just remove breakpoints and it will continue. If I want to stop, it means STOP. The behavior I'm referring to is that you don't need to assign variables and it goes up. In case of my HTML module when I stop debugging I get full HTML 50 pages long thrown into a console (because it doesn't just continue to run saving to file and all) but throws everything out to console. |
Indeed, that's what I meant above. Although other languages treat this like that, I think in our case the expectation is for script execution to stop immediately. |
I think wrt other languages, a decent amount follow this model:
|
That makes sense to me |
Ok @PrzemyslawKlys I'm assuming this one was closed as irrelevant today lol |
Yes, it no longer acts like that. So I closed it. |
Issue Description
I am experiencing a problem with... debugging. I set a breakpoint as I would normally do. The code stops.
I see what I want to see - I press SHIFT+F5 to stop PowerShell and fix the issues.
In production the code is stopped, and nothing more is happening. In Preview the data that is currently in place seems to flow to terminal.
Normally you should be able to reproduce it with something similar to:
After it hits breakpoint, when you do Shift + F5 it will throw everything else into the
But while working on this easy to use example I seem to hit #2175 issue all the time. After I run the code, nothing happens (F5 stops working). And after I restart PowerShell
And can't run any code either. I have to close VSCode to be able to work again.. however finally I was able to run different code, and again try to build a working example:
It will display all tests from Tes2.
But I can pretty much catch #2175 90% of the time using:
Sorry for mixing up two problems, but it just came while I was trying to reproduce so maybe related.
Attached Logs
Follow the instructions in the README about
capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: