vscode-remote-release
vscode-remote-release copied to clipboard
Update alert verbiage when building a devcontainer.json with invalid syntax
When you have a devcontainer.json with an invalid property and go to build the dev container, you get the following message:
This isn't clear to the user what they need to do in order to successfully build the dev container. It would be more intuitive to the user to get an alert that says something like "The devcontainer.json contains invalid syntax." with an option to "View syntax error", which will open the devcontainer.json at the place where the invalid syntax occurs.
Video reproducing scenario:
https://github.com/microsoft/vscode-remote-release/assets/95261576/c100b8f4-b032-482b-817f-a3855eb1fb9c
VS Code version information: Version: 1.87.0-insider (user setup) Commit: ec291c126878742ad640055ce604a58129cd088c Date: 2024-02-05T05:46:55.122Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Windows_NT x64 10.0.22621
Dev Containers extension information: Name: Dev Containers Id: ms-vscode-remote.remote-containers Description: Open any folder or repository inside a Docker container and take advantage of Visual Studio Code's full feature set. Version: 0.340.0 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
The message addresses the case when we get a devcontainer.json that was used for Codespaces without image information. We could change the message to capture both cases: "Dev Container configuration '.devcontainer/devcontainer.json' file is missing image information. This can also be due to invalid syntax. You can correct or add the image information manually or overwrite the configuration with a template."
We currently open the config after the dialog is dismissed, we could open it beforehand to help the user decide.