arrterian / nix-env-selector

Allows switch environment for Visual Studio Code using Nix Package Manager.
MIT License
220 stars 29 forks source link

Extension Development Host does not launch #77

Open sacsar opened 1 year ago

sacsar commented 1 year ago

For context, I (too) was about to implement #59 and opened the extension itself in VSCode. When you press F5/run the extension, the Extension Development Host window never opens.

To Reproduce Steps to reproduce the behavior:

  1. Open the extension in VS Code
  2. Press F5 and/or click "Run Extension"

Expected behavior A second VSCode window (with title prefixed by [Extension Development Host]) opens. (See https://code.visualstudio.com/api/get-started/your-first-extension)

Environment:

Additional context The cause is using watch in the pre-launch task here: https://github.com/arrterian/nix-env-selector/blob/master/.vscode/launch.json#L19 Removing the pre-launch task and running watch in a terminal gets you as far as being able to simply restart the extension after you make a change. I'm not sure if it should be possible to "reload" in the extension development host window.

(It's also worth noting that if you run the extension in an empty window, it fails because the workspace dir is null. I assume that's known/intentional, though I did fix it. Let me know if you want a PR for that.)