Should vscode debugger work in REPL for included functions?

I’m running the vscode REPL and including scripts (via includet or include) which have functions defined. However, if I set breakpoints in the script files (say in myFunc) and do @run myFunc(), the breakpoint is skipped. In fact, if there is an error in the function, it doesn’t seem to be happy to step into the function (i.e. doesn’t highlight the line of code with the error). Is this expected?

Alternatively, using @enter myFunc() does step in and lets me debug as I would expect.

Note I don’t see my code in the compiled section of the debug pane (what would it be under as it’s a script not a module?).

Try disabling all compiled functions/modules. It’s likely that that list has bitrotted and isn’t applicable to recent Julia versions anymore.

1 Like

Thanks this was indeed the problem. Should have thought to try it out before asking.

Is that list of compiled code just for when we’re debugging? As it seems that @run ends up being slow, but just calling my functions is quite quick.

Yes.

1 Like