zhimou li
zhimou li

Reputation: 1

"code" command does not work in Powershell

"code" command for VSCode does not work on Windows

-Tried to invoke the script directly - no output.

(base) PS C:\Users\lemon\AppData\Local\Programs\Microsoft VS Code\bin> ls


    目录: C:\Users\lemon\AppData\Local\Programs\Microsoft VS Code\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         2023/9/14      5:55           2067 code
-a----         2023/9/14      6:21       16738736 code-tunnel.exe
-a----         2023/9/14      5:55            167 code.cmd


(base) PS C:\Users\lemon\AppData\Local\Programs\Microsoft VS Code\bin> ./code.cmd
(base) PS C:\Users\lemon\AppData\Local\Programs\Microsoft VS Code\bin> ./code
(base) PS C:\Users\lemon\AppData\Local\Programs\Microsoft VS Code\bin>

Running Code.exe can correctly create the editor window

Help:About output:

Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621
(base) PS C:\Users\lemon> code --disable-extensions
(base) PS C:\Users\lemon> code --verbose
(base) PS C:\Users\lemon> code --log debug
(base) PS C:\Users\lemon>```

The commands above seems have no output

(base) PS C:\Users\lemon> code
(base) PS C:\Users\lemon> code | ps
(base) PS C:\Users\lemon> where code
(base) PS C:\Users\lemon> get-command code

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     code.cmd                                           0.0.0.0    C:\Users\lemon\AppData\Local\Programs\...

May I get to know how to fix this?

Upvotes: 0

Views: 177

Answers (1)

zhimou li
zhimou li

Reputation: 1

For anyone suffering the same issue as I do --

The problem actually is caused by the uninstallation of the Anaconda package manager: Cmd crashes with exit code 1 after uninstalling anaconda

The process exited with code 1 is just too general and masked bunches of problem.

Upvotes: 0

Related Questions