All Projects → xpl → Panic Overlay

xpl / Panic Overlay

Licence: unlicense
Displays JS errors in browsers. Shows sources. Use with any framework. 💥✨

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Panic Overlay

Bugsnag React Native
Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
Stars: ✭ 374 (+648%)
Mutual labels:  error-handling, error-reporting, debug, stacktrace
Bugsnag Php
Bugsnag error monitoring and crash reporting tool for PHP apps
Stars: ✭ 475 (+850%)
Mutual labels:  error-handling, error-reporting, debug
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (+542%)
Mutual labels:  stack, error-handling, stacktrace
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-4%)
Mutual labels:  error-handling, error-reporting, debug
Bugsnag Js
Javascript error handling tool for Bugsnag. Monitor and report JavaScript bugs & errors.
Stars: ✭ 625 (+1150%)
Mutual labels:  error-handling, error-reporting, debug
bugsnag-vue
[DEPRECATED] This package now lives within the monorepo for our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 26 (-48%)
Mutual labels:  error-handling, debug, error-reporting
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (+210%)
Mutual labels:  error-handling, error-reporting, debug
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+1392%)
Mutual labels:  error-handling, error-reporting, debug
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (+322%)
Mutual labels:  error-handling, error-reporting, debug
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (+2%)
Mutual labels:  error-handling, debug, error-reporting
Tracerr
Golang errors with stack trace and source fragments.
Stars: ✭ 646 (+1192%)
Mutual labels:  error-handling, debug, stacktrace
bugsnag-wordpress
Bugsnag error monitoring for WordPress sites
Stars: ✭ 20 (-60%)
Mutual labels:  error-handling, error-reporting
Js Stack From Scratch
🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.
Stars: ✭ 18,814 (+37528%)
Mutual labels:  webpack, stack
Traceback with variables
Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works in Jupyter and IPython. Install with pip or conda.
Stars: ✭ 509 (+918%)
Mutual labels:  error-handling, stacktrace
go-errors
Flexible, general-purpose error handling for Go.
Stars: ✭ 17 (-66%)
Mutual labels:  stacktrace, error-handling
raygun4ruby
The Ruby & Ruby on Rails provider for Raygun
Stars: ✭ 37 (-26%)
Mutual labels:  error-handling, error-reporting
Rxdogtag
Automatic tagging of RxJava 2+ originating subscribe points for onError() investigation.
Stars: ✭ 601 (+1102%)
Mutual labels:  error-handling, error-reporting
Articles Translator
📚Translate the distinct technical blogs. Please star or watch. Welcome to join me.
Stars: ✭ 606 (+1112%)
Mutual labels:  webpack, parcel
Error Overlay Webpack Plugin
Catch errors with style 💥✨
Stars: ✭ 821 (+1542%)
Mutual labels:  webpack, error-handling
Wasm Dev Book
Rust を用いた WebAssembly の開発環境を構築する手法を紹介する本.
Stars: ✭ 36 (-28%)
Mutual labels:  webpack, parcel

panic-overlay BETA 💥✨Build Status NPM

A lightweight standalone plain JS alternative to react-error-overlay that is not tied to React / Webpack and works with any framework or even without one.

If you miss that thing from create-react-app but do not want to use that framework (e.g. you want to use Parcel as a lightweight zero-configuration alternative) — here you go!

Features

  • Displays runtime errors in browsers
  • Minimalistic implementation (bare DOM API), easily hackable
  • Full sourcemap support (shows original code, not transpiled)
  • Clickable locations (opens in VS Code), see the notes here
  • Uncluttered stacktraces (collapses third party library calls)

How It Looks

Screen Shot 2019-03-11 at 00 11 00

Installation

npm install panic-overlay
import 'panic-overlay' // should be the very first import in your app!

Using Without A Bundler

All-in-one browser bundle (batteries included), served from a CDN of your choice. Creates a global panic object.

<script src="https://unpkg.com/panic-overlay"></script>

Demos

Here's how you can find an example usage of panic-overlay with various bundlers:

git clone https://github.com/xpl/panic-overlay.git
cd panic-overlay
npm install
Environment Run with Source folder
<script> tag npm run demo-no-bundler demo/no-bundler
Parcel npm run demo-parcel-vanilla demo/parcel-vanilla
Parcel (React JSX) npm run demo-parcel-react demo/parcel-react
Webpack npm run demo-webpack-vanilla demo/webpack-vanilla
Snowpack npm run demo-snowpack-vanilla demo/snowpack-vanilla

Disabling Automatic Error Handling

Once imported, panic-overlay shows itself whenever an uncaught error occurs in a browser. This can be undesirable in a production environment. You can disable that behavior in run-time:

import panic from 'panic-overlay'

panic.configure ({ handleErrors: false })

Although it is better to not import the panic-overlay in a production build, to minimize the bundle size. Unfortunately, there is no universal way to do a conditional module import at compile-time — in each bundler/framework it is achieved in its own way.

Showing Manually

panic (error) // where error is either an instance of an Error or a string taken from Error.stack

VS Code Notes

Currently there is a problem with automatically determining the full file paths (at least, when using Parcel bundler), so you need to provide it manually, otherwise the error locations won't be clickable:

import panic from 'panic-overlay'

panic.configure ({ projectRoot: '/full/path/to/my/project' })

Custom Click Handler

You can intercept clicks on call stack entries. For the entry format, see this.

panic.configure ({
    stackEntryClicked (entry) {
        alert (`Clicked on ${entry.fileRelative}:${entry.line}:${entry.column}`)
    }
})

Hacking

The panic-overlay is just a GUI for the stacktracey library that provides all the magic related to callstack parsing, source code extraction and filtering of the clutter. I also maintain that library, so any contributions to its code are welcome as well.

I highly appreciate any help from the community with the following:

  • [ ] Testing with various module bundlers / frameworks
  • [ ] Implementing parsing of React JSX errors in stacktracey (see more here)
  • [ ] Determining the full file paths for clickable locations
  • [ ] Animations & better layout (probably need to center it for wide screens)

...One More Thing™

There is also a way to improve your Node errors (and the overall debug output) legibility by using the Ololog library which is built on the same stack and is maintained by me also. Check it out!

const log = require ('ololog').handleNodeErrors () // intercepts process errors

Screen Shot 2019-04-06 at 00 56 17

Color logging with displaying of the log call location (file + line), so you can quickly find out from the logs, where it was called in the code:

log.bright.green ('Syncing order books...')
Screen Shot 2019-05-15 at 17 38 15
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].