Infiltrator based debugger

See the following code, I have added @infiltrate after every statement in the function such that I can debug everything. But then I was thinking this might be an excellent UI debugger alternative: having @infiltrate happening automatically and inspecting the variables in the UI as we usually do.
What would be the advantages and downsides of this approach compared to the current interpreter based debugger?

I opened a PR with a similar idea on the Infiltrator repo

My idea was to wrap every line in a try... catch e @infiltrate end

I think this could be done with a special include(insert_infiltrate, file) method that does it automatically for the included file.

1 Like

I noticed @pfitzseb actually considered this long time ago: Hooks for Juno/VSCode integration · Issue #2 · JuliaDebug/Infiltrator.jl · GitHub.
I also noticed there is a functional form here:
function infiltrate(mod, locals, file, line) I guess I can generate infiltrators all over the place without touching my code - I’m going to try this :slight_smile:.

@pfitzseb I’m wondering if there are issues with this style of debugging? Or is actually pretty good and it’s more about not having enough time left to add it in the UI?