This addon adds a global helper function to open a running DDEV container in VS Code (Visual Studio Code).
This addon has 3 main requirements:
- DDEV
- Visual Studio Code
- Dev Containers, an extension for VS Code
Please see the relevant home pages above for installation and setup instructions.
-
Open a terminal to an existing project.
-
Install the
ddev-vscode-devcontaineradd-on:ddev add-on get tyler36/ddev-vscode-devcontainer
The command will become available after running ddev start or ddev restart.
ddev codeddev code -d-db or --database may also be used.
The command assumes the VSCode executable (code) is available on your path.
WSL users may need to add the following to their ~/.bashrc file.
# Add default VSCODE install path to path
export PATH="$PATH:/mnt/c/Program Files/Microsoft VS Code/bin"You can can customize the command by removing #ddev-generated from ~/.ddev/commands/host/code.
Note, this will prevent DDEV from updating the command.
Contributed and maintained by @tyler36