devpul 1.1.1
devpul: ^1.1.1 copied to clipboard
Stream HTTP calls, errors and custom events from a running Dart or Flutter app to a browser UI over the Dart VM service. Debug builds only.
devpul #
Core of DevPul: streams HTTP calls, errors, logs, session info and custom events from a running Dart or Flutter debug build to a browser UI over the Dart VM service. No proxy, no server; the UI runs only in your browser. Pure Dart, works on the web.
Install #
dependencies:
devpul: ^1.1.1
Then add what your app uses:
- devpul_dio for Dio, devpul_http for package:http.
- devpul_flutter for Flutter errors,
debugPrintand routes. - devpul_test for a session file from each failing test.
- devpul_cli for
devpul run, plugins and coding agents. A global tool, not a dependency:dart pub global activate devpul_cli.
Usage #
import 'package:devpul/devpul.dart';
void main() {
Devpul.session({'name': 'My app', 'version': '1.0.0'}, tags: {'env': 'dev'});
Devpul.emit('cart.updated', {'items': 3});
Devpul.log('Signed in', name: 'auth');
Devpul.action('Clear cache', (_) => cache.clear());
try {
sync();
} catch (e, s) {
Devpul.error(e, s, source: 'sync');
}
}
Run the app in debug and open DevPul:
- DevTools: the DevPul tab, in the browser or your IDE. Every run prints a link that opens it.
- Command line:
devpul runfrom devpul_cli, in place offlutter run. - Hosted site: paste the app's VM service URL on devpul.saradgajurel.com.np.
The core API page covers configuration, redaction, limits and handlers; getting started the whole setup.
Plugins #
Plugins add tabs to the UI. devpul add <id> from devpul_cli copies one into your app:
- riverpod: Riverpod providers and their recent changes.
- bloc: blocs and cubits, their state and recent events.
- go_router: the route tree, location and matches.
- app_links: incoming links and a test link box.
- web_socket_channel: WebSocket connections and their messages.
- files: the app's path_provider directories.
- secure_storage: flutter_secure_storage keys.
- sqflite: sqflite tables, rows and a SQL console.
- local_notifications: scheduled and shown notifications.
See installing plugins and writing plugins.
Limits #
- Debug builds, and profile builds built with
--dart-define=DEVPUL_PROFILE=true. Release builds never emit. - Configuration is per isolate.
See limits.
