Skip to content

Commit a638a09

Browse files
committed
added a way to debug the service
1 parent 7066ce2 commit a638a09

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.vscode/launch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"name": "Attach",
6+
"port": 9229,
7+
"request": "attach",
8+
"skipFiles": [
9+
"<node_internals>/**"
10+
],
11+
"type": "pwa-node"
12+
},
413
{
514
"name": "Debug Main Process",
615
"type": "node",

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ tuxedo-control-center
7373
| inc-version-major | Major version increase (updates package.json files) |
7474

7575
### Debugging
76-
Debugging of electron main and render process is configured for vscode in .vscode/launch.json
76+
Debugging of electron main and render process is configured for vscode in `.vscode/launch.json`.
77+
Note that the application must be rebuilt each time a change is made. Usually `npm run build-ng` is sufficient.
78+
79+
To debug the service, run `npm run debug-service` the launch the `Attach` target in `.vscode/launch.json`.
7780

7881
## Screenshots
7982
![alt text](screenshots/Systemmonitor_TCC.png "")

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"build-service": "tsc -p ./src/service-app && cp ./src/package.json ./dist/tuxedo-control-center/service-app/package.json && run-s bundle-service",
2424
"bundle-service": "pkg --target node10-linux-x64 --output ./dist/tuxedo-control-center/data/service/tccd ./dist/tuxedo-control-center/service-app/package.json",
2525
"start-service": "sudo NODE_PATH=\"./dist/tuxedo-control-center/data/service:${NODE_PATH}\" node ./dist/tuxedo-control-center/service-app/service-app/main.js --start",
26+
"debug-service": "sudo NODE_PATH=\"./dist/tuxedo-control-center/data/service:${NODE_PATH}\" node --inspect-brk ./dist/tuxedo-control-center/service-app/service-app/main.js --start",
2627
"build-native": "node-gyp configure && node-gyp rebuild",
2728
"copy-files": "run-s copy-package-json copy-dist-files copy-native",
2829
"copy-native": "mkdir -p ./dist/tuxedo-control-center/service-app/native-lib && cp ./build/Release/TuxedoWMIAPI.node ./dist/tuxedo-control-center/data/service",

0 commit comments

Comments
 (0)