
ddev-vscode-devcontainer
What is ddev-vscode-devcontainer?
This addon adds a global helper function to open a running DDEV container in VS Code (Visual Studio Code).
Requirements
This addon has 3 main requirements:
Please see the relevant home pages above for installation and setup instructions.
Getting started
- Open a terminal to an existing project.
-
Install the ddev-vscode-devcontainer
add-on:
For DDEV v1.23.5 or above run
ddev add-on get tyler36/ddev-vscode-devcontainer
For earlier versions of DDEV run
ddev get tyler36/ddev-vscode-devcontainer
The command will become available after running ddev start
or ddev restart
.
Usage
Open the web container
Open the database container
-db
or --database
may also be used.
Support
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"
Customization
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