File tree Expand file tree Collapse file tree 1 file changed +27
-5
lines changed
doc/modules/ROOT/pages/basics Expand file tree Collapse file tree 1 file changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,33 @@ so we'll examine them tool by tool.
206206
207207==== Enabling nREPL JVMTI agent
208208
209- Since version 1.2.0, nREPL ships together with a native JVMTI agent, so that the
210- eval interrupts properly work on Java 21 and later. To enable the agent, the
211- Java process should be launched with `-Djdk.attach.allowAttachSelf`. CIDER will
212- do it automatically during jack-in if `cider-enable-nrepl-jvmti-agent` is set to
213- `t`.
209+ Since version 1.2.0, nREPL includes a native JVMTI agent which makes the eval
210+ interrupts work properly on Java 21 and later. To enable the agent, the Java
211+ process should be launched with `-Djdk.attach.allowAttachSelf`. CIDER will do it
212+ automatically during jack-in if `cider-enable-nrepl-jvmti-agent` variable is set
213+ to `t`.
214+
215+ [IMPORTANT]
216+ ====
217+ `cider-enable-nrepl-jvmti-agent` has no effect if you start a REPL
218+ process outside of Emacs and connect to it with `cider-connect`. In that
219+ scenario, you have to add `-Djdk.attach.allowAttachSelf` Java property manually
220+ through the means of the build tool. In Leiningen, add this to `project.clj`:
221+
222+ [source,lisp]
223+ ----
224+ :jvm-opts ["-Djdk.attach.allowAttachSelf"]
225+ ----
226+
227+ In tools.deps, add this to one of the aliases that you enable with the REPL:
228+
229+ [source,lisp]
230+ ----
231+ :aliases {:dev
232+ {:jvm-opts ["-Djdk.attach.allowAttachSelf"]
233+ ...}}
234+ ----
235+ ====
214236
215237==== Leiningen Options
216238
You can’t perform that action at this time.
0 commit comments