Skip to content

Commit

Permalink
Updated debugging section
Browse files Browse the repository at this point in the history
* Moved Sayid debugger to its own page.  Need to add more on using Sayid with
  Spacemacs.
  • Loading branch information
practicalli-johnny committed Oct 10, 2018
1 parent 686916d commit 159fcc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
* [Gists](github/gists.md)
* [Debugging](debugging/index.md)
* [Inspect values](debugging/inspect-values.md)
* [Sayid debugger](debugging/sayid-debugger.md)
* [Markdown documentation](markdown-mode/index.md)
* [Org-mode](org-mode/index.md)
* [Headings](org-mode/headings.md)
Expand Down
34 changes: 5 additions & 29 deletions debugging/index.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
# Debugging

[Sayid](http://bpiel.github.io/sayid/), pronounced "siy EED", is an omniscient debugger and profiler for Clojure.
I would argue that debugging is less critical in Clojure as you have the REPL and mostly pure functions (hopefully), so its easy to evaluate parts of your code to see the results.

Sayid works by intercepting and recording the inputs and outputs of functions. It can even record function calls that occur inside of functions. The user can select which functions to trace. Functions can be selected individually or by namespace. The recorded data can be displayed, queried and profiled.
Spacemacs clojure layer also provides an inspector and a debugger.

Sayid currently has three components:
- core and its supporting namespaces
- nREPL middleware
- an emacs-cider nREPL client
* cider-inspector
* sayid debugger

| Key Binding | Description |
|-------------|--------------------------------|
| `SPC m d b` | instrument expression at point |
| `SPC m d e` | display last stacktrace |
| `SPC m d r` | reload namespaces |
| `SPC m d v` | inspect expression at point |


> #### HINT::Sayid is part of the Clojure layer
> [Sayid](http://bpiel.github.io/sayid/) is part of the Clojure layer for Spacemacs.
>
> The Sayid debugger library is injected into the REPL when it is run.

{% youtube %}
https://www.youtube.com/watch?v=wkduA4py-qk?autoplay=1loop=1
{% endyoutube %}



# References

http://endlessparentheses.com/conditional-breakpoints-in-the-cider-debugger.html
https://cider.readthedocs.io/en/latest/debugging/

0 comments on commit 159fcc6

Please sign in to comment.