Debug.jl
Debug.jl copied to clipboard
Using `n` on a for-loop skips over the loop
Consider the following code that is assumed to be correctly marked for debugging
function f()
@bp
for i in 1:10
t = i.^2
end
end
If the debugger is trapped at the for i in 1:10 line I issue the command n then the whole for-loop is executed. This is contrary to every debugger I've used and is also inconsistent with the behavior of other types of blocks in julia. For example, using n on an if statement causes the debugger to enter the block.
use 's' instead. according to the documentation "'n' : step over any enclosed scope". a for loop in julia is a scope.
I was suggesting that 'n' be made consistent with most every other debugger and step into scopes, just not functions.
On Wed, Sep 25, 2013 at 5:29 AM, Ben Arthur [email protected]:
use 's' instead. according to the documentation "'n' : step over any enclosed scope". a for loop in julia is a scope.
— Reply to this email directly or view it on GitHubhttps://github.com/toivoh/Debug.jl/issues/47#issuecomment-25081823 .
I agree that it could be useful to have a step over command that behaves more like most debuggers. Not sure how much work it might be. I will see if I eventually get some time to look at this.