question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can you enable debugging for main process - for a built app.?

See original GitHub issue

I’ve been using this boilerplate for 2 projects so far, lately i am running into errors in main process only in the built app. when running npm run dev it works fine. My question is: how can i enabled debugging for main process on a built app.

Update: For now i am just logging to file to debug - but there should be a real solution.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
davidwintercommented, Jul 25, 2018

@yanivkalfa I added @sentry/electron to my app/package.json file - it had to be this one or I’d receive errors from the root package.json file.

Then in my main.dev.js and index.js files, have something like this as close to the top of each file as possible, so that it can catch exceptions as early on as possible:

import * as sentry from '@sentry/electron';

if (process.env.NODE_ENV === 'production') {
  sentry.init({
    dsn: 'https://abcdefg1234@sentry.io/1234567'
  });
}

Obviously updating the dsn value with your own.

Then if exceptions happen, they appear in the Sentry web app.

1reaction
jsrhomecommented, Jul 24, 2018

Have you tried: DEBUG_PROD=true npm run package

It works for me, and gives you the Chromium developer console. This is documented in the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debug your app - Android Developers
Enable debugging · Enable debugging on your device: If you're using the emulator, this is enabled by default. But for a connected device,...
Read more >
Enable debugging for ASP.NET apps - Visual Studio (Windows)
Publish in debug mode using the file system · For ASP.NET, select Local IIS, select the website you created for the app, and...
Read more >
Enabling USB Debugging on an Android Device - Embarcadero
On the device, go to Settings > About <device>. Tap the Build number seven times to make Settings > Developer options available. Then...
Read more >
What Is USB Debugging Mode on Android? How to Enable It
USB Debugging allows an Android device to communicate with a computer ... Android has a built-in printing function, so when writing an app, ......
Read more >
Debugging an Electron Application - Manning
With these two configuration files in place, you can click on the left margin of any line in your main process to set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found