The REPL¶
Starting a REPL¶
A REPL (Read Eval Print Loop) buffer is automatically open when a new Indium connection is made (see Getting up and running).
The REPL offers the following features:
- Auto completion with
company-mode
- JS syntax highlighting
- Pretty printing and preview of printed values
- Access to the object inspector (see The inspector)
Using the REPL¶
Keybindings¶
Here is the list of available keybindings in a REPL buffer:
Reconnecting from the REPL buffer¶
When a connection is closed (most probably because other devtools were open on the same runtime), the REPL will display two buttons, one to try to reopen the connection, and another one to kill Emacs buffers using this connection (the REPL buffer, inspectors & debuggers).
Code evaluation & context¶
When evaluating code in the REPL, Indium will always run the code on the current execution context.
This means that while debugging, code execution will happen in the context of the current stack frame, and will be able to access local variables from the stack, etc.