Repo for vscode debug of Hydroshare Docker containers
-
You must first clone Hydroshare if you haven't
-
Run local-dev-first-start-only if you haven't. No need to do the
docker-compose up
, we will modify that step so that it uses a custom .yml file -
cd into your new hydroshare dir and clone this repo:
git clone git@github.com:hydroshare/vscode.git .vscode
NOTE: yes, that.vscode
is supposed to be a hidden dir. See https://code.visualstudio.com/docs/editor/debugging#_launch-configurations. -
run
.vscode/configure-vscode-debug.sh
to create a required init-hydroshare-debug and remove your hydroshare container <<< YES, it will remove your container! -
run
docker-compose -p hydroshare -f .vscode/docker-compose.debug.yml up
to build the new container and bring it up -
use vscode "run and debug" module to connect to the container and start debugging
-
Add breakpoints in vs-code
-
Browser-> navigate to localhost:8000 and trigger your breakpoints
You can run this as a git submodule too but I don't think we want to checkin any of the submodule info into the hydroshare repo
So if you do this, just make sure you don't commit the added files to Hydroshare
From your project root:
git submodule add -f git@github.com:hydroshare/vscode.git .vscode
git submodule update --remote .vscode
- then follow all of the above instructions to use