From 6896160c38c8756513e9327e906cd1a950ccc4a6 Mon Sep 17 00:00:00 2001 From: Jarod Gowgiel Date: Sun, 1 Dec 2024 17:55:59 -0700 Subject: [PATCH] Add an npm script to run the Electron app for debugging This allows for developers to attach Dev Tools, e.g. the Chrome "dedicated DevTools for node", to the main Electron process for debugging operations that occur on the main process. --- package.json | 3 ++- packages/bruno-electron/package.json | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ebe1af53f..449c90b38 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "build:web": "npm run build --workspace=packages/bruno-app", "prettier:web": "npm run prettier --workspace=packages/bruno-app", "dev:electron": "npm run dev --workspace=packages/bruno-electron", + "dev:electron:debug": "npm run debug --workspace=packages/bruno-electron", "build:bruno-common": "npm run build --workspace=packages/bruno-common", "build:bruno-query": "npm run build --workspace=packages/bruno-query", "build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs", @@ -51,6 +52,6 @@ "prepare": "husky install" }, "overrides": { - "rollup":"3.29.5" + "rollup": "3.29.5" } } diff --git a/packages/bruno-electron/package.json b/packages/bruno-electron/package.json index 7c4945a44..52b9c8bbb 100644 --- a/packages/bruno-electron/package.json +++ b/packages/bruno-electron/package.json @@ -9,6 +9,7 @@ "scripts": { "clean": "rimraf dist", "dev": "electron .", + "debug": "electron . --inspect=9229", "dist:mac": "electron-builder --mac --config electron-builder-config.js", "dist:win": "electron-builder --win --config electron-builder-config.js", "dist:linux": "electron-builder --linux AppImage --config electron-builder-config.js", @@ -19,7 +20,9 @@ "test": "node --experimental-vm-modules $(npx which jest)" }, "jest": { - "modulePaths": ["node_modules"] + "modulePaths": [ + "node_modules" + ] }, "dependencies": { "@aws-sdk/credential-providers": "3.658.1",