nextron
nextron copied to clipboard
How i can debug errors on production app
When I run the app using "run dev," everything works fine. Additionally, when I build the app, there are no issues during the process. However, after installing the built app, errors occur when running it. Unfortunately, I'm having trouble identifying which library is causing these errors.
Same
Same
hi nitives, u using pnpm? i changed to yarn and now works fine, but really can't debug errors on production app
Same
hi nitives, u using pnpm? i changed to yarn and now works fine, but really can't debug errors on production app
I just stopped attempting to use it, I was using normal npm and
The only way I found I could debug is to write logs to a file and read it
I tried using electron-log
which basically write the logs to a file and it works for me right now.
Other options are:
- 3rd party monitoring services
- Sentry
- New Relic
- Setup IPC connection that sends every log from the main process to the renderer process and log them from their. This setup works if you allow
devTools
totrue
.
I tried using
electron-log
which basically write the logs to a file and it works for me right now.Other options are:
3rd party monitoring services
- Sentry
- New Relic
Setup IPC connection that sends every log from the main process to the renderer process and log them from their. This setup works if you allow
devTools
totrue
.
I totally do the same in my current project using IPC. and It is very helpful.
Personally I use electron-unhandled which works nicely. It also lets you send git issues with a report button.
Maybe this helps as inspiration: We're also using electron-log with some nifty helpers for error logging, which gives better insights to the error stack. We're pretty happy and it has helped a lot so far.
https://github.com/blib-la/captain/blob/4afb7d4a1b70bcce9862aa78d602838053bd9cd9/src/electron/helpers/services/logger.ts
We did consider electron-unhandled but went for electron-log instead. You could also chekout electron-debug
In the end it's really up to your preference.