Misc Debugging Tools
Expanding Macros
Typing C-c C-m after some form in a source buffer or the
REPL will show you the macro expansion of the form in a new
buffer. You’ll have access to additional keybindings in the macro
expansion buffer (which is internally using
cider-macroexpansion-mode
):
Keyboard shortcut | Description |
---|---|
m |
Invoke |
a |
Invoke |
g |
The prior macro expansion is performed again and the current contents of the macro expansion buffer are replaced with the new expansion. |
C-/ |
Undo the last in-place expansion performed in the macroexpansion buffer. |
Inspecting Values
Typing C-c M-i after some form in a source buffer or the
REPL will show you the structure for the result of the form in a new
buffer. You can also use C-u C-c M-i to inspect the result
of the current top-level form and C-u C-u C-c M-i to read
an expression from the minibuffer and inspect its result. You’ll have
access to additional keybindings in the inspector buffer (which is
internally using cider-inspector-mode
):
Keyboard shortcut | Description |
---|---|
Tab or Shift-Tab |
Navigate inspectable sub-objects |
Return |
Inspect sub-objects |
l |
Pop to the parent object |
g |
Refresh the inspector (e.g. if viewing an atom/ref/agent) |
SPC |
Jump to next page in paginated view |
M-SPC |
Jump to previous page in paginated view |
s |
Set a new page size in paginated view |
d |
Defines a var with current inspector value |