I am using emacs for clojure development.
So after using: Cu Mx cider-jack-in
(in my test file). Followed by lein repl
followed by Mx cider-connect
I get a strange, partially working repl at the root of my project where I have to provide the fully qualified path of every function complete with its namespace.
How can I provide cider a custom entry point (eg a test file)? How can I preload parts of the namespace, or halt execution at a specific point in the program?
Preloading namespaces can be done with Cc Ck
in the namespace.
You can place a debug point with Cu CMx
. When you run code and hit a breakpoint you can follow the keybindings that appear to step in or over lines et cetera. You can use Cc Cc
to remove the breakpoint.
See https://github.com/clojure-emacs/cider/blob/master/doc/debugging.md for more information on debugging.
Example from above link:
you can change your repl namespace by entering (in-ns 'some.namespace)
in repl. Or otherwise cider allows you to switch to open file's namespace: open the file in emacs and execute cider-repl-set-ns
(or Cc Mn
).
To load the whole file into the repl use cider-load-buffer
(Cc Ck), or cider-load-file
(Cc Cl), and to load single s-expression use cider-eval-last-sexp
(placing the cursor after sexp you want to exec and Cx Ce) or cider-eval-sexp-at-point
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.