ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
859 stars 277 forks source link

No apparent way to config/debug ionide on vscode with nixos at WSL #1504

Open vrescobar opened 3 years ago

vrescobar commented 3 years ago

Describe the bug**

I am using nixos under WSL, so I use vscode with the nix plugin and I create an environment with sharp, omnisharp, dotnet-sdk 3 and 5 and everything appears to work on the command line, however, ionide never seems to get started as it doesn't show, how should I debug it?

Steps to reproduce

  1. Create a new SAFE template on a nixos wsl instance and open it on windows vscode
  2. Add the file shell.nix and initialize the environment
  3. dotnet restore
  4. Open any F# file, it only has syntax highlighting but no suggerences or documentations
  5. Execute the vscode command F#: Get ionide logs. Error pops up

The output from ionide logs is:

Command 'F#: Get Ionide logs' resulted in an error (command 'fsharp.diagnostics.getIonideLogs' not found)

The shell.nix file contents are:

{ nixpkgs ? import <nixpkgs> {  } }:

let
  pkgs = [
    nixpkgs.nodejs
    nixpkgs.yarn
    nixpkgs.stack
    nixpkgs.git
    nixpkgs.dotnet-sdk_3
    nixpkgs.dotnet-sdk_5
    nixpkgs.fsharp
    nixpkgs.omnisharp-roslyn
  ];

in
  nixpkgs.stdenv.mkDerivation {
    name = "SAFE";
    buildInputs = pkgs;
}

Expected behavior

Ionide working as good as nodejs and other tooling does or to see a helpful message about what ionide binary has been called, and what was the return code came or any other helpful information.

Machine info

Additional context

If I could somehow see the actual logs and know whether ionide tries to begin, and where is the exact configuration I may correct the path to make it point to the correct binaries at nix os.

Any help is welcome

open-collective-bot[bot] commented 3 years ago

Hey @vrescobar :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our OpenCollective and consider backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us :smile:

piaste commented 3 years ago

I'm running into the same issue on WSL2 Debian / Windows 10 with the .NET SDK 5.0.200.

Up to version 5.2.0 - Ionide loads (but project cracking fails due to #1509)

Version 5.3.2 and version 5.4.0 - Ionide doesn't load at all, the F# symbol is missing from the Activity Bar, F# isn't available in the Output drop-down menu. Trying to open the logs behaves the same as for @vrescobar.

"F#: Clear Project Cache" also gives the same kind of error:

Command 'F#: Clear Project Cache' resulted in an error (command 'fsharp.clearCache' not found)

More stuff that didn't work:

EDIT: Tried using Ionide on Windows 10 directly (not in WSL2) and the same behaviour appears on a fresh new project. Something might be wonky with my VSCode setup as a whole...

piaste commented 3 years ago

Update: Completely uninstalled VSCode and all extensions, settings, etc., then reinstalled from scratch. Now Ionide 5.4.0 works. Will update this comment if I find any new extension/setting that replicates the issue.

vip-ehowlett commented 2 years ago

I am having this exact same issue as @piaste on windows.

.NET SDK (reflecting any global.json): Version: 6.0.201
Commit: ef40e6aa06

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043 OS Platform: Windows
RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.201\

Host (useful for support): Version: 6.0.3 Commit: c24d9a9c91

Update: Completely uninstalled VSCode and all extensions, settings, etc., then reinstalled from scratch. Now Ionide 5.4.0 works. Will update this comment if I find any new extension/setting that replicates the issue.

I did this and still am not getting it to load. The new "Runtime Status" tab on the extension says it's never even activated.

image