Debugging

If you want to look up in the source code where and how a particular method is defined, use @which. For example: if arr = [1, 2] then @which sort(arr) returns sort(v::AbstractArray{T,1}) where T) in Base.Sort at sort.jl:683 at sort.jl:334.

@show shows the expression and its result, which is handy for checking the embedded results: 456 * 789 + (@show 2 + 3) gives 2 + 3 => 5     359789.

Get Julia 1.0 Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.