question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Project detection not working on WSL windows

See original GitHub issue
  • I’m sure this issue is not a duplicate.

VS Code instances running on WSL do not seem to auto detect project or workspace settings, this means that opening a project on Windows will set a preset and later on, any project that i open from WSL will be using that preset, the only way to change it is setting up another preset on a Windows project. Icon presets seem to work really well on a single window, but with multiple vscode windows, they just mix and act weirdly, i made a comment in here about presets mixing between to vscode windows tho that is under another discussion, i made searches about WSL and auto detection and couldn’t find anything so i hope this is not an isolated issue, but it would be nice to at least be working on a single WSL project at a time (due to the preset mix) and get auto detection.

In this example i’m opening two workspaces that switch between angular and nestjs preset, both projects are brand new created with @angular/cli and @nestjs/cli

Also on that demo i didn’t try to se this "vsicons.projectDetection.autoReload": true on the WSL instances but later on i did and the result was the same, nest project stayed with angular preset even after deleting settings.json(workspace) reloading windows, creating a new settings.json(workspace) and setting "vsicons.presets.nestjs": true in it.

vsicons-wsl-autodetect

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
JimiCcommented, Apr 17, 2020

So I found some time to look into this. Things are exactly as I suspected.

Both vscode instances use the same vscode-icons extension simply because we have told vscode that it should run vscode-icons from the local file system and not the remote one (see #2404). If you open the Extensions explorer you will notice that vscode-icons is only installed locally and not on WSL and that vscode does not provide an option to install it in WSL.

Now if you go to your settings (settings.json) and add the following:

"remote.extensionKind": {
    "vscode-icons-team.vscode-icons": ["workspace"]
}

by reloading vscode you will now notice an option to install vscode-icons on WSL. By doing so you will see vscode-icons showing up in the WSL part of the Extensions explorer.

From there on, experiment further.

Hope this helps.

0reactions
OmarOmeiricommented, Dec 10, 2021

@JimiC I have made this and I could make the installation successful in WSL, but somehow, the extension is appending C:\ to my project path. This is what the logs show.

[2021-12-10 09:44:12.579] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/Omar/.vscode-insiders/extensions/vscode-icons-team.vscode-icons-11.8.0/dist/src/vscode-icons.bundle.js
[2021-12-10 09:44:13.359] [exthost] [error] Activating extension vscode-icons-team.vscode-icons failed due to an error:
[2021-12-10 09:44:13.359] [exthost] [error] Error: ENOENT: no such file or directory, open 'C:\home\omar\CODE\Lullo\Client\package.json'
[2021-12-10 09:49:45.396] [exthost] [info] extension host terminating: renderer closed the socket
[2021-12-10 09:49:46.402] [exthost] [info] exiting with code 0

I’m suspecting this is why my custom icons aren’t loading

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not detect any SDK in WSL project after upgrade to 2021.1
Can not detect any SDK in WSL project after upgrade to 2021.1 · File -> Project Structure · Select "Modules" · Click +...
Read more >
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >
WSL is not detected - Visual Studio Feedback
I have WSL (1.0) installed for a long time, yet when I've opened the CMake project in Visual Studio it tells me that...
Read more >
TensorFlow Object Detection on WSL (Windows Subsystem ...
Object Detection does NOT work with TensorFlow version 2. Have to install most recent version of 1. pip install tensorflow==1.15 ...
Read more >
Add support for WSL git on Windows | Sourcetree for Windows
yes, if you could do this for both git and mercurial, that would go a LONG way towards fixing the "windows" symlink issues....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found