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:
Please see the relevant home pages above for installation and setup instructions.
Install the ddev-vscode-devcontainer add-on:
ddev add-on get tyler36/ddev-vscode-devcontainer
The command will become available after running ddev start or ddev restart.
ddev code
ddev 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