Error tracking for NativePHP desktop apps. Errors go to NativeWatch.
composer require zinxan/native-desktopAdd the key of your NativeWatch project to .env:
NATIVEWATCH_KEY=nw_...
NATIVEWATCH_URL=https://native.watchSend a test error:
php artisan nativewatch:testReportable exceptions enter a bounded on-disk outbox. NativeWatch normally sends them after the response and retains failed network deliveries for a later retry. Capture and disk work have a cost; an unwritable outbox can cause an immediate send attempt. Read the offline delivery guide for retry, capacity and permanent rejection behavior.
Before shipping, review privacy and diagnostic consent. Use the desktop installation guide to verify a real stored event from your packaged app.
Report something yourself:
use ZXN\NativeWatch\Core\Laravel\NativeWatch;
use ZXN\NativeWatch\Core\Level;
NativeWatch::addBreadcrumb('sync', 'Started the sync');
NativeWatch::captureMessage('The disk is almost full', Level::Warning);
NativeWatch::captureException($exception);Publish the config to change sampling, scrubbing or breadcrumbs:
php artisan vendor:publish --tag=nativewatch-config| Command | What it does |
|---|---|
php artisan nativewatch:test |
Sends a test error and tells you whether NativeWatch accepted it. |
php artisan nativewatch:flush |
Sends the events waiting in the offline outbox now. |
php artisan nativewatch:release 1.4.0 --repository=owner/app --previous=SHA |
Run in CI: publishes the changed lines of a release so issues can show likely commits. It needs NATIVEWATCH_RELEASE_TOKEN, a CI-only secret. Never put it in the app. Add --id-only to print the build ID without a token. |
Read release and commit tracking
before you set up nativewatch:release.