MyNixOS website logo
Description

Interactive development tool for Elm programs.

Provides an interactive development tool that makes it easy to develop and debug Elm programs. It will automatically compile any Elm program—independent of editor. It permits hot-swapping and time-traveling debugging.

Elm Reactor

Interactive development tool that makes it easy to develop and debug Elm programs. Key features include:

This means you can get a great development experience whether you are using Sublime Text, emacs, vim, or whatever else to edit Elm code.

Install

Install Elm Platform. This will install Elm Reactor and everything else it needs.

Use

Navigate to the Elm project you want to work on. A great project to get started with is elm-examples which contains some simple programs that should be fun to debug.

In the root of your Elm project start the reactor with:

elm-reactor

Now open http://localhost:8000 in your browser. You should see a navigation page for your project.

Click on any file to see what it looks like. For example, you can navigate to an Elm file and try it out. If you modify the file, you can just refresh that page and see the new version!

Time Travel Debugging

To use the debugger, click the small wrench next to every Elm file. This will start your Elm program with a control panel that lets you:

  • Pause, rewind, and continue from any point.

  • Add watches and traces to track and visualize values over time.

  • Swap in new code at any time, maintaining all recorded events.

Debugging code embedded in HTML

To use the debugger with more complex HTML or CSS, you may want to start the debugger from within an HTML file. This process is still improving, so use this with caution.

In your custom HTML file, load the /_reactor/debug.js script.

<script type="text/javascript" src="/_reactor/debug.js"></script>

That creates the Elm.fullscreenDebug function so you can initiate your Elm program with the debugger:

var main = Elm.fullscreenDebug('MyProject.Main', 'MyProject/Main.elm');

The first argument is the name of the module you would like to debug. The second argument is the name of the source file for that module. The file name is needed so that we know which file to recompile when the Reactor detects that a file has changed. You may edit a dependency, but we always need to compile from the root file.

Metadata

Version

0.3.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows