Skip to content

Commit 3fc5d4f

Browse files
committed
[Fix #1067] Add a troubleshooting section to the README
1 parent 9c4eb0e commit 3fc5d4f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ do so.
2222

2323
* Include any relevant code to the issue summary.
2424

25+
### Reporting bugs
26+
27+
When reporting bugs it's a good idea to go through the `Troubleshooting` section
28+
of the README. Adding information like the backtrace and the nREPL messages to
29+
the bug report makes it easier to track down bugs. Some steps to reproduce a bug
30+
reliably would also make a huge difference.
31+
2532
## Pull requests
2633

2734
* Read [how to properly contribute to open source projects on Github][2].

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,40 @@ loaded. As a workaround remove
965965

966966
from your Emacs config.
967967

968+
## Troubleshooting
969+
970+
In case you run into issues here are a few tips that can help you diagnose the
971+
problem.
972+
973+
Generally, it's not a bad idea to configure Emacs to spit the backtrace on error
974+
(instead of just logging the error in the `*Messages*` buffer. You can toggle
975+
this behavior by using `M-x toggle-debug-on-error`.
976+
977+
### REPL not starting
978+
979+
Make sure that your `CIDER` version matches your `cider-nrepl` version. Check
980+
the contents of the `*Messages*` buffer for `CIDER`-related errors. You should
981+
also check the nREPL messages passed between CIDER and nREPL in
982+
`*nrepl-messages*`. If you don't see anything useful there it's time to bring
983+
out the big guns.
984+
985+
#### Debugging the REPL init
986+
987+
Emacs features a super powerful built-in
988+
[Emacs Lisp debugger](http://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html)
989+
and using it is the best way to diagnose problems of any kind. To debug CIDER's
990+
REPL initialization it's a good idea to hook into one of its entry points. Add a
991+
breakpoint to `cider-make-repl` (`C-u C-M-x`, while its body). Next time you
992+
start CIDER you'll be dropped in the debugger and you can step forward until you
993+
find the problem.
994+
995+
Here's a [great crash course](https://www.youtube.com/watch?v=odkYXXYOxpo) on
996+
using the debugger.
997+
998+
### Missing `*nrepl-messages*` buffer
999+
1000+
Check the value of `nrepl-log-messages`. It should be non-nil.
1001+
9681002
## Documentation
9691003

9701004
A single-page quick reference PDF for CIDER commands is available [here](doc/cider-refcard.pdf). This PDF can be created manually by running `pdflatex` on [the CIDER refcard LaTeX file](doc/cider-refcard.tex).

0 commit comments

Comments
 (0)