console freeze replication because of quick edit in windows 11
Hey guys, i am having a c# console application that calls a ps script. This ps script installs a bunch of py packages using pip.
Most of the time the installation is successful, but sometimes the console just hangs/freezes until some keypress is encountered.🥲
How do i replicate this reliably to test and solve the issue
7 Replies
The console can freeze by clicking into it. This can be fixed by disabling Quick Edit mode. Look it up:)
Yeah thnx for the reply 😃 i have gone through the posts but i still doesn't know that solved the issue until i replicate it somehow
Just click into the console to display the selection marker, when the quick edit is enabled
Write a simple console app that outputs to the console in a while loop
Click into it
And see the output stop
Make sure to console write the date time to see the output change
Did the same steps in windows 10 and confirmed that. But i am unable to do the same in win 11
Is it only because of clicks or is it something else like i am using vnc
Huh, interesting observation. The last time I've had to fix this issue was on Win10
And it was due to clicks
Tbh the main application doesnt even out to console only when all the py packages are installed a message is displayed
For now I settled upon the solution. Attaching the link for people who might face the same
https://stackoverflow.com/questions/13656846/how-to-programmatic-disable-c-sharp-console-applications-quick-edit-mode
Cheers!
Stack Overflow
How to programmatic disable C# Console Application's Quick Edit mode?
I've tried several solutions found, like the one ->
http://www.pcreview.co.uk/forums/console-writeline-hangs-if-user-click-into-console-window-t1412701.html
But, I observed that mode in GetConso...