-
Install dependencies:
docker-compose run --rm app npm install
. -
Run
docker-compose up
. -
Open a vscode and in command palette (cmd + shift + p) select "Remote-Containers: Attach to Running Container..." and select the name of the container with the app.
-
Install needed extensions (even if you had them installed locally, you need to reinstall them within the container): "esbenp.prettier-vscode" and "ms-vscode.js-debug-nightly".
-
"Format Document" command should work well.
-
Run "Debug: Attach to Node Process" in command palette and select the right process (pid: 1). Now you can use breakpoints and debug the app.
node_modules
folder is not exposed to local disk but you can see it in vscode since we attached to a container.
Since node_modules
is not synced with local disk, processes in docker (node, npm, etc.) run much faster.
-
Install dependencies:
docker-compose run --rm app bundle install
. -
Run
docker-compose up
. -
Open a vscode and in command palette (cmd + shift + p) select "Remote-Containers: Attach to Running Container..." and select the name of the container with the app.
-
Install needed extension (even if you had them installed locally, you need to reinstall them within the container): "rebornix.ruby".
-
Open debugger (cmd + shift + d) and run "Attach" command. You can now set breakpoints and debug the app.