Hi, all
When the jump macro is included in my code, the debug using vscode always jumps to some internal functions. What I want to ask is how to step through these codes without jumping into places where no breakpoints are set. for example:
model = Model(Gurobi.Optimizer)
A = 2
B = 10
@variable(model, x[1:A, 1:B])
@constraint(model, sum(x) == 10)
When I set a breakpoint at the position of @variable(model, x[1:A, 1:B])
and step through it, it will be transferred to macros.jl
.
When I set a breakpoint at the position of @constraint(model, sum(x) == 10)
and step through it, it will be transferred to rewrite.jl
, and then jump to macros.jl
.
My current approach is to write println(...)
after the code that needs to set breakpoints to see what variables or constraints are created. This is obviously very troublesome, especially when these JuMP macros are in for loops or functions. Difficult to modify my code in real time based on the results of debugging
By the way, clicking VScode’s debug button always takes a very long time to start. Is there any way to speed up this process?
Thanks a lot !