julia-vscode / julia-vscode

Julia extension for Visual Studio Code
https://www.julia-vscode.org/
Other
1.28k stars 202 forks source link

Cthulhu integration? #1915

Open ChrisRackauckas opened 3 years ago

ChrisRackauckas commented 3 years ago

It would be really nice to have a hook like Cthulhu's @descend where it could then show all of the relevant type information on each line, and allow clicking into functions. Like a hybrid of Cthulhu and Juno's profiler integration.

xgdgsc commented 1 year ago

How to use https://github.com/JuliaDebug/Cthulhu.jl/pull/469 ?

Zentrik commented 1 year ago

How to use https://github.com/JuliaDebug/Cthulhu.jl/pull/469 ?

Update Cthulhu, you need version 2.9.3

xgdgsc commented 1 year ago

Thanks for the tip. It works! Can we do this automatically for functions at focus if the arguments are type defined? Or set a package level entry point and call in background periodically?

Zentrik commented 1 year ago

There's no way to do that at present. However, If you created an async task that called cthulhu_typed periodically you could probably get what you want. If you want to do that have a look at _descend in Cthulhu to see how to get the required information to call cthulhu_typed. Alternatively, you might be able to pass a fake terminal to descend_code_typed and then call Revise periodically.

kbarros commented 7 months ago

For those not following along closely, now that https://github.com/JuliaDebug/Cthulhu.jl/pull/469 is merged, there is integrated VSCode support for Cthulhu. Simply call Cthulhu.@descend ... in the VSCode Julia REPL. Inferred types should appear on top of the relevant Julia code. To exit the Cthulhu interface in the REPL, Ctrl-C seems to work.

What are the remaining blockers before closing this issue?