All Projects → layflags → elm-monitor

layflags / elm-monitor

Licence: MIT License
Monitor your elm program with redux-devtools

Programming Languages

elm
856 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to elm-monitor

devtools-tips
A collection of useful cross-browser DevTools tips
Stars: ✭ 81 (+305%)
Mutual labels:  debugging
CrashLogger
A dll injected into process to dump stack when crashing.
Stars: ✭ 19 (-5%)
Mutual labels:  debugging
CSS-Lecture-And-Exercises
🎨 Get to know CSS! It's fun!
Stars: ✭ 11 (-45%)
Mutual labels:  debugging
docker-pudb
Debug Python code within a Docker container remotely from your terminal using pudb
Stars: ✭ 18 (-10%)
Mutual labels:  debugging
InAppDevTools
Android library with a collection of tools for debugging, inspecting and reporting from within your own app
Stars: ✭ 26 (+30%)
Mutual labels:  debugging
pytest-faulthandler
py.test plugin that activates the fault handler module during testing
Stars: ✭ 27 (+35%)
Mutual labels:  debugging
debugger
Debugging helper for Go
Stars: ✭ 54 (+170%)
Mutual labels:  debugging
question-driven-learning
Stay hungry stay foolish
Stars: ✭ 17 (-15%)
Mutual labels:  debugging
devmod
Developer Module for debugging web applications
Stars: ✭ 16 (-20%)
Mutual labels:  debugging
pydbg
Python implementation of the Rust `dbg` macro
Stars: ✭ 85 (+325%)
Mutual labels:  debugging
deno-debug
Debugging utility for deno. Ported from https://npmjs.com/debug
Stars: ✭ 15 (-25%)
Mutual labels:  debugging
use-debugger-hooks
A small package of custom React hooks that are useful for debugging changes in React hook dependencies across renders
Stars: ✭ 44 (+120%)
Mutual labels:  debugging
ynm3k
ynm3k.readthedocs.io
Stars: ✭ 20 (+0%)
Mutual labels:  debugging
kokkos-tools
Kokkos C++ Performance Portability Programming EcoSystem: Profiling and Debugging Tools
Stars: ✭ 52 (+160%)
Mutual labels:  debugging
debug.cr
Debug macro for Crystal
Stars: ✭ 86 (+330%)
Mutual labels:  debugging
ircpdb
Remotely and collaboratively debug your Python application via an IRC channel.
Stars: ✭ 59 (+195%)
Mutual labels:  debugging
WhatTheStack
See a pretty error screen when your Android app crashes
Stars: ✭ 240 (+1100%)
Mutual labels:  debugging
slabdbg
GDB plug-in that helps exploiting the Linux kernel's SLUB allocator
Stars: ✭ 55 (+175%)
Mutual labels:  debugging
ReSwiftMonitor
ReSwift+redeux dev tools
Stars: ✭ 13 (-35%)
Mutual labels:  redux-devtools
r2lldb
radare2-lldb integration
Stars: ✭ 54 (+170%)
Mutual labels:  debugging

elm-monitor

Monitor your elm program with redux-devtools during development. It's really just for monitoring and inspecting state and actions. Action replay (time travel) is not supported.

Screenshot Redux Devtools

How to use it?

  1. Install the dependency: $ npm install elm-monitor

  2. Import and initialize elm-monitor in your index.js:

    import monitor from 'elm-monitor';
    ...
    monitor();
    
  3. Copy or symlink Monitor.elm into your source folder, via e.g. ln -s ../node_modules/elm-monitor/src/Monitor.elm src

  4. Import Monitor.elm into your Main.elm with import Monitor

  5. Replace Browser.application with Monitor.application in your Main.elm

  6. Open Redux Devtools in your browser and reload your app.

Attention!

You should only use this during development. Elm won't build when Monitor.elm is used, because it depends on Debug.log.

What if I don't use Browser.application?

Besides being able to monitor Browser.application, Monitor.elm additionally exports:

  • Monitor.worker - when using Platform.worker
  • Monitor.sandbox - when using Browser.sandbox
  • Monitor.element - when using Browser.element
  • Monitor.document - when using Browser.document

How does it work under the hood?

It's quite simple. Monitor.elm just logs the state on init as well as every action and resulting state on update to the browser console. monitor.js connects to redux-devtools, patches console.log to extract messages logged by Monitor.elm, parses and transforms the log messages using elm/parser (thx @ChristophP) and passes them over to redux-devtools.

How does it map Elm to JS data structures?

  • Int, Float -> Number
  • Char, String -> String
  • Unit () -> null
  • List -> Array
  • Tuple -> Array
  • Type constructor -> Array [⟨Ctor⟩, param1, param2] or String ⟨Nothing⟩
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].