Skip to content

Commit 7a41f8d

Browse files
[DDW-987] Debug the main process (#2893)
Co-authored-by: Daniel Main <[email protected]>
1 parent c515b62 commit 7a41f8d

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
### Features
66

77
- Implemented error message when trying to leave wallet without enough ada to support tokens ([PR 2783](https://github.com/input-output-hk/daedalus/pull/2783))
8+
9+
### Chores
10+
11+
- Removed SASS ts-lint ignore comments ([PR 2870](https://github.com/input-output-hk/daedalus/pull/2870))
12+
- Enabled debugging of the main process ([PR 2893](https://github.com/input-output-hk/daedalus/pull/2893))
13+
14+
## 4.9.0
15+
16+
### Features
17+
818
- Added display of current/unspent rewards ([PR 2803](https://github.com/input-output-hk/daedalus/pull/2803))
919
- Improve the syncing screen by showing syncing progress split into three stages ([PR 2877](https://github.com/input-output-hk/daedalus/pull/2877))
1020
- Improved stake pool searchbar ([PR 2847](https://github.com/input-output-hk/daedalus/pull/2847))
@@ -19,10 +29,6 @@
1929

2030
- Fixed Daedalus menu in Storybook used for theme and language selection ([PR 2886](https://github.com/input-output-hk/daedalus/pull/2886))
2131

22-
### Chores
23-
24-
- Removed SASS ts-lint ignore comments ([PR 2870](https://github.com/input-output-hk/daedalus/pull/2870))
25-
2632
## 4.9.0-FC1
2733

2834
### Features

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ Make sure to list bootstrap in externals in `webpack.config.base.js` or the app
194194
externals: ['bootstrap']
195195
```
196196

197+
### Debugging
198+
199+
You can debug the main process by following one of these approaches:
200+
- [VSCode](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_attaching-to-nodejs)
201+
- [Chrome](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients)
202+
- [IntelliJ](https://www.jetbrains.com/help/idea/run-debug-configuration-node-js-remote-debug.html)
203+
204+
The inspector runs on port 9229
205+
197206
## Testing
198207

199208
You can find more details regarding tests setup within

gulpfile.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const rendererWebpackConfig = require('./source/renderer/webpack.config');
88

99
// Setup electron-connect server to start the app in development mode
1010
let electronServer;
11+
const electronServerAgs = ['--inspect=9229'];
1112
// Gulp input sources for main and renderer compilation
1213
const mainInputSource = () => gulp.src('source/main/index.ts');
1314
const rendererInputSource = () => gulp.src('source/renderer/index.ts');
@@ -47,7 +48,7 @@ const buildMainWatch = () => (done) =>
4748
.pipe(
4849
webpackStream(mainWebpackWatchConfig, webpack, () => {
4950
// Restart app every time after main script has been re-compiled
50-
electronServer.restart();
51+
electronServer.restart(electronServerAgs);
5152
done();
5253
})
5354
)
@@ -79,7 +80,7 @@ gulp.task(
7980
gulp.task('clean:dist', shell.task('rimraf ./dist'));
8081

8182
gulp.task('server:start', (done) => {
82-
electronServer.start();
83+
electronServer.start(electronServerAgs);
8384
done();
8485
});
8586

@@ -92,13 +93,10 @@ gulp.task('server:create:dev', (done) => {
9293
});
9394

9495
gulp.task('server:create:debug', (done) => {
95-
createElectronServer(
96-
{
97-
NODE_ENV: process.env.NODE_ENV,
98-
XCURSOR_PATH: '/usr/share/icons' || 'development',
99-
},
100-
['--inspect', '--inspect-brk']
101-
);
96+
createElectronServer({
97+
NODE_ENV: process.env.NODE_ENV,
98+
XCURSOR_PATH: '/usr/share/icons' || 'development',
99+
});
102100
done();
103101
});
104102

0 commit comments

Comments
 (0)