-
Notifications
You must be signed in to change notification settings - Fork 220
Description
Hello,
I'm using @einsum from the Tullio package, https://github.com/mcabbott/Tullio.jl, and I get an unexpected behavior when debugging a Julia program in VSCode. The debugger always stops at the same line in macro.jl, a file from Tullio, without having set a break point there.
Say, I have a program like
using Tullio: @einsum
v = [1; 2; 3];
w = [4; 5; 6]; # <== 1st breakpoint
@einsum a[i,j] := v[i] * w[j];
println("a=", a);
b = 4 * a; # <== 2nd breakpoint
println("b=", b);
After I start the debugger with F5, VSCode shows correct behavior at the 1st breakpoint, see first snapshot.
When I continue with F5 the debugger stops in line 826 of macro.jl, a file of Tullio, see 2nd snapshot.
Another continue with F5 leads me to the 2nd BP, see 3rd snapshot.
In case I have several @einsum statements the debugger stops several times always in macro.jl at line 826. That can be disturbing if I want to debug code after many @einsum statements.
I discussed this behavior with the author of Tullio, @mcabbott, and we think that it is a problem of VSCode.
With Base.remove_linenums!(@macroexpand1 @einsum a[i,j] := v[i] * w[j]) one can check the code generated by @einsum.
See mcabbott/Tullio.jl#33.
Any hints?
Ralf
After starting the debugger with F5 at the 1st breakpoint (as expected)
Continue F5 and the debugger stops in macro.jl (unexpected behavior)
Another Continue F5 and the debugger stops at the 2nd break point (as expected)