Hello, if I run a long simulation (example below) in VSCode, CTRL+C interrupt works (or doesn’t) depending on how I have started calling the main simulation function:
If I have mylongsimulation() (the function call) in a file and I am evaluating that row (CTRL+ENTER) in VSCode, the CTRL+C then doesn’t work/interrupt, while if I type the same call command in the VSCode associated Julia terminal, CTRL+C works as expected.
Is there a workaround to have CTRL+C working even if I run mylongsimulation() from the main VSCode file panel ?
Example of a long-running function:
function mylongsimulation()
println("Starting long simulation...")
for i1 in 1:100
mylongssimulationinner1(i1)
end
println("Simulation complete")
end
function mylongssimulationinner1(i1)
println("- Starting inner simulation 1 with i1 $i1...")
for i2 in 1:10
mylongssimulationinner2(i2)
end
return nothing
end
function mylongssimulationinner2(i2)
println("-- Starting inner simulation 2 with i2 $i2...")
for i in 1:10
sleep(0.001)
end
return nothing
end
