microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.66k stars 287 forks source link

File watching using tsc --watch doesn't work in dev container #8470

Open hannesne opened 1 year ago

hannesne commented 1 year ago

Steps to Reproduce:

  1. Open a typescript project in a dev container. I am using this one: https://github.com/mspnp/vnet-integrated-serverless-microservices/tree/main/src/AuditApi
  2. Open the terminal, and run tsc --watch
  3. Wait for compilation to finish.
  4. Edit a .ts file and save it
  5. Compilation is not triggered.

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

stuartleeks commented 1 year ago

@hannesne Do you have WSL installed? If so, is the source code cloned in the Windows file system (e.g. C:\...) or in WSL (/home/hannes/...)?

hannesne commented 1 year ago

I have it in the windows file system. Cloning it into WSL poses other issues, because it insists on opening the root of the repo - I have several projects here that I work on that I want to be the root of the workspace at different times, each with their own specific dev container.

stuartleeks commented 1 year ago

Two questions....

  1. Did you get a warning/notification about opening the dev container from a Windows file system?
  2. Can you describe the repo folder structure? I'd be interested to understand what dev container definitions you have and how you want them to open. (And how moving the files to WSL affects the way you open them)
RihanArfan commented 1 year ago

Experiencing something similar on the C# and MSSQL devcontainer, with the VSCode Git changes not automatically refreshing. Files are on my C drive and mounted in the devcontainer.

I don't recall getting a warning when opening it in a devcontainer. I use devcontainers so I don't need to litter my computer with a bunch of .NET SDKs and can quickly update.

Version ### VSCode ``` Version: 1.78.2 (user setup) Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435 Date: 2023-05-10T14:39:26.248Z Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: Yes ``` ### Dev Container ``` Linux d7de443e417f 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian ``` ### WSL ``` Default Version: 2 Kernel version: 5.10.16 NAME STATE VERSION * rancher-desktop Running 2 rancher-desktop-data Stopped 2 ```
hannesne commented 1 year ago

@stuartleeks I did receive the warning. Didn't really know what to do with it - I want to keep my files in the c: so that changes I make in the dev container are also visible when i'm working outside a dev container or in a different dev container. My project has several different services in subdirectories off a /src directory, each with it's own dev container.

hannesne commented 1 year ago

@stuartleeks I did receive the warning. Didn't really know what to do with it - I want to keep my files in the c: so that changes I make in the dev container are also visible when i'm working outside a dev container or in a different dev container. My project has several different services, each with it's own dev container.