Open inikishev opened 2 weeks ago
do you have anything set up to automatically run after a file is saved such as linter
or formatter
? if you do, can you disable that and retry?
that said, there is a slightly more complicate but something that can greatly help us to find out what is going on if you can provide us a window log.
window has a way to log/track every single process creation. but it is disabled by default, if you turn it on and repro again, it will point us exactly what process ran with what command line options by who.
1, open gpedit.msc
(group policy editor)
Computer configuration -> windows settings -> security settings -> Advanced Audit Policy Configuration -> System Audit Policies -> Detailed Tracking -> Audit Process Creation (double click and enable both success
and failure
)
Administrative Templates -> System -> Audit Process Creation -> Include command line in process creation events (double click and enable it)
repro the issue you showed above (make sure you remember time when it happened)
open eventvwr.msc
(event viewer)
Windows Logs -> Security (find Event ID: 4688 and find log entry at the time you reproed and double click and go to details
and click XML view
and provide us the xml)
that log should tell us how the process is created by what.
after that, you can disable the Audit process
@inikishev if you can't pinpoint exact entries from the log, please provide all entries around the time it reproed.
Environment data
Expected behavior
No cmd pop ups
Actual behavior
whenever I make change to my code and save it and cause pylance to reanalyze the workspace, cmd pops up and instantly closes
here is a video of the issue https://youtu.be/5DFH9g799gA I save the file, causing pylance to analyze workspace, and it pops up. And then I change the file and save it, and it happens again. Those constant popups are quite annoying when coding, and they sometimes move focus away from where I am typing. All other extensions are disabled, and I restarted vscode.
This doesn't happen with pylance disabled.
I also notice that rarely it lags and has enough time to render what is inside the cmd, and it says "[Process ended with exit code 0 (0x00000000)]. You can now close this terminal with Ctrl+D, or press Enter to restart.". Sometimes though, it lags, but remains empty. So maybe those are two separate popups.
Logs
This is the exact part tha always gets outputted after cmd window pops up
In an issue https://github.com/microsoft/vscode-python/issues/20284 I found that changing "Windows Terminal" to "Console Host" as the default terminal, the issue was gone. However for me, the issue is not gone, now I get console host popups. Otherwise my issue looks exactly the same.
In https://github.com/microsoft/vscode-python/issues/20836 I found to add
"python.experiments.optInto": ["pythonTerminalEnvVarActivation"]
, however that didn't solve the issue either.