Skip to content

Commit

Permalink
chore: log hint on renderer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Sep 14, 2020
1 parent bc9816b commit 45f8abc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/browser/api/web-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ WebContents.prototype._init = function () {

this.on('crashed', (event, ...args) => {
app.emit('renderer-process-crashed', event, this, ...args);

// Log out a hint to help users better debug renderer crashes.
if (!process.env.ELECTRON_ENABLE_LOGGING) {
console.info('Renderer process crashed - setting ELECTRON_ENABLE_LOGGING may provide more information.');
}
});

this.on('render-process-gone', (event, ...args) => {
Expand Down

0 comments on commit 45f8abc

Please sign in to comment.