-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Cannot open source files from within file manager (Thunar) #212125
Comments
This does not sound like a bug in VS Code but an issue with your setup, but leaving this issue open to see if others hit it as well. |
What inclined me to think this could be a VS Code bug is that it appeared exactly after the last VS Code update. VS Code is my IDE and I use it every day. If there's something I can do to test which one is the case, I am more than willing to try. I could think of one test, which is not conclusive but seems to suggest the issue is related to VS Code: |
So you cannot reproduce when you install
|
I'm also experiencing the same issue with the Dolphin file manager after the last update, opening a file with the "Open file" dialog o dragging it to an opened Code window works fine. Code is installed through the snap package manager. These are the information displayed in the About dialog: Version: 1.89.0 |
Please downgrade and see if its not reproducible then: #212125 (comment) |
I can confirm that reverting Code with the "snap revert" command resolved the issue, the current installation details are the following: Version: 1.88.1 |
@majid4466 are you also on Snap? Does this reproduce when not using Snap but Deb? |
Yes, I have VS Code installed as a Snap package. I am hesitant to experiment with my development machine by uninstalling VS Code and testing the deb version. If I get the chance to install the deb version on another machine I will report the result here. |
Thanks |
But it would still be interesting to get at the verbose logs when it works vs when it does not work. |
I tried to reproduce the issue on another workstation and a virtual machine but the snap package 1.89.0 works fine. If I find some time today I will retry to upgrade Code again on the pc that presented the issue and let you know the result. |
Yeah I am not expecting a regression in VS Code but a setup/install issue. |
I attached the log generated by opening a file from file manager with both Code versions. |
Yeah, as expected, in version
And in
So on the way of opening from the finder to VS Code, the argument is either never passed or lost. |
Moving to Daniel and Deepak as this seems Snap install related, I doubt we changed something how we create the Snap file, but I am not sure either. |
I have the same issue on Gnome Nautilus, double click on the file in the file manager launches a new empty instance of VSCode. I'm using Arch and VSCode is installed through AUR. Version: 1.89.1 |
same for me |
Same problem with thunar file manager on ubuntu: Version: 1.89.1 Installed through the deb package from apt repo |
After downgrading to 1.89.0 the issue still exists: # downgrading code from 1.89.1-1715060508 to 1.89.0-1714530869
sudo apt install code=1.89.0-1714530869 First buggy version (.deb)Version: 1.89.0 A further downgrade to 1.88.1 fixes the problem: # downgrading code from 1.89.0-1714530869 to 1.88.1-1712771838
sudo apt install code=1.88.1-1712771838 Last working version (.deb)Version: 1.88.1 |
Issue still exists in the latest version 1.91.1 Version: 1.91.1 |
Based on the affected versions, seems like a regression from 0da22a2 |
I removed the Additional verification steps once a new Insiders is out: #21133 (comment) |
Based on the latest posts here and pointing to a regression from 0da22a2 I found a workaround. I am on an Xubuntu machine with XFCE and Whiskers menu. Here is what I did:
That was it! The issue gone. |
Thanks @majid4466, |
I gave it a try. Changing the command to |
I manually downloaded and installed VS Code 1.87 with @majid4466 my current assumption is that your update process left the @leukipp do you also see a |
@rzhao271 ls -lah /usr/share/applications/code*
-rwxrwxr-x 1 root root 708 Sep 11 20:06 /usr/share/applications/code.desktop
-rw-rw-r-- 1 root root 312 Sep 11 20:06 /usr/share/applications/code-url-handler.desktop cat /usr/share/applications/code*
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code %F
Icon=vscode
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Name[de]=Neues leeres Fenster
Name[es]=Nueva ventana vacía
Name[fr]=Nouvelle fenêtre vide
Name[it]=Nuova finestra vuota
Name[ja]=新しい空のウィンドウ
Name[ko]=새 빈 창
Name[ru]=Новое пустое окно
Name[zh_CN]=新建空窗口
Name[zh_TW]=開新空視窗
Exec=/usr/share/code/code --new-window %F
Icon=vscode
[Desktop Entry]
Name=Visual Studio Code - URL Handler
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --open-url %U
Icon=vscode
Type=Application
NoDisplay=true
StartupNotify=true
Categories=Utility;TextEditor;Development;IDE;
MimeType=x-scheme-handler/vscode;
Keywords=vscode; No When running code from the terminal, which code
/usr/bin/code ls -lah /usr/bin/code*
lrwxrwxrwx 1 root root 24 Sep 13 09:00 /usr/bin/code -> /usr/share/code/bin/code This is a symlink and the executable points to Running Double clicking the file opens an empty code window and the process output shows: ps -fC code
UID PID PPID C STIME TTY TIME CMD
user 107051 1 1 02:55 ? 00:00:01 /usr/share/code/code --unity-launch /home/user/SOMEFILE.txt The As @majid4466 mentioned, the Whisker Menu entry still contains the flag. I boiled it down to be located here: cat /home/user/.local/share/applications/code.*
[Desktop Entry]
Version=1.1
Type=Application
Name=Visual Studio Code
GenericName=Text Editor
Comment=Code Editing. Redefined.
Icon=com.visualstudio.code
Exec=/usr/share/code/code --unity-launch %F
Actions=new-empty-window;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Categories=Development;IDE;
Keywords=vscode;
StartupWMClass=Code
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F The Removing the |
Is the I can document on the VS Code website the issue of |
Type: Bug
After the most recent update when I double click source files (*.php, *.js, etc.) a new instance of VS code is spawned and nothing is opened, neither in the already open vs code instance nor in the new one.
Files could be opened by dropping them on VS code window and by using the explorer as well as using search results.
My dev box has Xubuntu 20.04 and the file manager I use is Thunar.
Here is the version information from the "About" dialog:
Version: 1.89.0
Commit: b58957e
Date: 2024-05-01T02:08:25.066Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 5.4.0-177-generic
VS Code version: Code 1.89.0 (b58957e, 2024-05-01T02:08:25.066Z)
OS version: Linux x64 5.4.0-177-generic
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (10)
(1 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: