From 4f915ec9108a027ea3ccf04ced2a1ec11ad6e5f0 Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@suma-ev.de>
Date: Fri, 3 Feb 2023 10:18:32 +0100
Subject: [PATCH] added debugger

---
 .vscode/launch.json | 21 +++++++++++++++++++++
 docker-compose.yml  |  1 +
 pass/package.json   |  4 ++--
 3 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 .vscode/launch.json

diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..7f5a5c9
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "node",
+            "request": "attach",
+            "name": "Docker: Attach to Node",
+            "port": 9229,
+            "address": "localhost",
+            "localRoot": "${workspaceFolder}/pass",
+            "remoteRoot": "/app",
+            "skipFiles": [
+                "${workspaceFolder}/node_modules/**/*.js",
+                "<node_internals>/**/*.js"
+            ],
+        }
+    ]
+}
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 7d7636f..6383817 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -18,6 +18,7 @@ services:
       - mgpassdata:/data
     ports:
       - 8080:3000
+      - 9229:9229
   redis:
     build:
       context: ./build/redis
diff --git a/pass/package.json b/pass/package.json
index c4dc533..de9f336 100644
--- a/pass/package.json
+++ b/pass/package.json
@@ -4,7 +4,7 @@
   "private": true,
   "scripts": {
     "start": "node ./bin/www",
-    "dev": "nodemon --exec node ./bin/www"
+    "dev": "nodemon --exec node --inspect=0.0.0.0 ./bin/www"
   },
   "dependencies": {
     "@paypal/paypal-js": "^5.1.1",
@@ -33,4 +33,4 @@
   "devDependencies": {
     "nodemon": "^2.0.20"
   }
-}
+}
\ No newline at end of file
-- 
GitLab