Fork me on GitHub
#cursive
<
2021-04-29
>
octahedrion12:04:27

has anyone got breakpoints working with the latest Cursive ?

Jeff Evans14:04:56

working for me on IJ Ultimate 2020.3, Cursive 1.10.2-2020.3

octahedrion15:04:18

I'm on the same versions except IJ CE

octahedrion15:04:47

ok I've got it. Breakpoints don't work in a namespace if you eval code in that ns using "send form to REPL"

octahedrion15:04:39

you have to eval code from another namespace because otherwise it can't find the information needed and the breakpoint turns into a grayed-out icon

octahedrion15:04:06

so it looks like breakpoints are limited to code outside the namespace from which you're evaluating code

cfleming20:04:52

No, that’s not right - the main problem is generally line numbers in the generated code, which can change if you’re editing and sending only parts of a namespace (i.e. with send form).

cfleming20:04:18

If you’re debugging a namespace, I always recommend re-sending the whole file to ensure all the line numbers are correct.

octahedrion07:04:21

I tried that (select-all, send to REPL) many times in different ways and it didn't work for me. Then I tried doing (use :reload this-namespace) in my (comment) block in the same file and it worked!

cfleming10:04:55

Select all and send is not the same thing, you want to use Tools -&gt; REPL -&gt; Load file in REPL which uses load-file and correctly creates the line numbers in the bytecode. Or require :reload will work too, anything that causes the whole namespace to be loaded using load-file.

octahedrion11:04:46

got it. It works

octahedrion11:04:13

thanks for your help!