How to debug a multithreaded code in VS code?

I am using VS code with Julia extension. I debug the code normally by putting breakpoints at specific locations. However, putting these breakpoints inside @threads macro with a for loop (or inside a multithreaded code with parallelization directive) will not let the debug stops at them. Any way to solve it?

That is not supported at the moment. I think a first step to enabling this would be a solution for Support for debugging tasks · Issue #413 · JuliaDebug/JuliaInterpreter.jl · GitHub, and then there would be a ton of additional work that we would have to do :slight_smile:

1 Like

Thanks for your feedback. It is true that this is needed.

  • Is there another IDE that supports Julia debugging with multithread?
  • Or what the people do for Julia debugging with multithread?

The feature is really lacking in JuliaInterpreter.jl, which is the underlying debugging engine that both VS Code and Debugger.jl use. I’m not aware of any other semi-feature complete debugging solution for Julia.

1 Like