Glancing at DebugAdapter.jl it seemed to me that you could debug a program “after the fact”, i.e. attach a debugger to it once it has started. Is that correct? Can DebugAdapter.jl do this? If so, can this functionality be used from the vscode plugin? I’m fine with running my code through a special function if need be.
Nice! Does the REPL have to be launched from vscode? How does vscode know which REPL to connect to? By port number? Can I launch a REPL outside of vscode and then connect to it?
Yes, use the Julia: Connect external REPL command for that. You’ll need to have a REPL available in the process you’re trying to connect to (though technically that requirement could be relaxed).
Is it an actual REPL I need to attach to? A Debugger.jl “session” (if such a thing exists) isn’t enough? I believe debugging in the REPL relies on Debugger.jl under the hood? I’m asking because I’m embedding Julia using jlrs and I don’t have a running REPL there, nor do I know of an official way to start one “after-the-fact”, programmatially, from inside Julia.
Julia: Connect external REPL requires an actual REPL, yes. DebugAdapter.jl doesn’t, but it’s easiest to use from one and we don’t currently officially support attaching to random Julia processes.
Yes, but Debugger.jl and DebugAdapter.jl both are debugger frontends built on top of the JuliaInterpreter.jl infrastructure. The VS Code integration only works with the latter.