Closed FatalMerlin closed 6 months ago
Is $XDG_CONFIG_HOME
set on your machine ? Based on the info it is very likely we are using it to create the user data folder https://github.com/microsoft/vscode/blob/2ce94ec26a00be22c2fa2fe8863794eded31a3c4/src/vs/platform/environment/node/userDataPath.js#L95 which is expected per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html.
But it is a bug that the launch from desktop uses a different user data folder in this case.
omg that was it :D thanks @deepak1556 ! somehow ended up as my user home.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
~/Code
nor~/.config/Code
exist..deb
file~/.config/Code
code
~/Code
was created, instead of under~/.config/Code
Note: also works properly when run via Gnome's "Run a command" dialog (ALT + F2). Note: also tested on 1.87.2
The bug appears regardless of command line arguments supplied (e.g.
code path/to/project/dir
) but can be semi-circumvented with explicit--user-data-dir ~/.config/Code
.I also noticed that when ran from the terminal, it also creates the
ibus
directory in the home dir and also launches the wrong default browser, e.g. when logging in to settings sync. It's almost as if the app somehow thinks that my $HOME is$HOME/.config
for some reason. This is reinforced by the config dir for the launched browser also appearing in my $HOME folder when launched from VS Code in this scenario (e.g.~/google-chrome
instead of~/.config/google-chrome
).This is a pretty fresh install of Debian so I did not yet have time to implement too many oddities on the system, however I did recently install a similar machine but I do not remember this occurring there.
I have verified that it is neither my terminal emulator (tried both GNOME Terminal and Warp Terminal) nor my $SHELL (tried both
bash
andzsh
.Even when copying the launch command from the
/usr/share/applications/code.desktop
file, the same issue occurs.When running with
code --verbose
the 2nd line already points to the wrong directory: