This package provides four macros: @dbg, @dumpct, @dumprt and @qn.
When executing
@dbg ex1 ex2 ex3 ...the macro generates code that displays all the expressions in the same way as @show does, each on a separate line,
preceded by the location in the format module:file:line. The output goes to stderr. Useful for debugging.
It is inspired by Rust dbg! macro.
The macros @dumpct and @dumprt
@dumpct expression
@dumprt expressiondump the provided expression at compile-time or run-time respectively.
The macro @qn
@qn expressionreturns the quoted expression without interpolating contained $.
julia> using DbgMacro
julia> m = [1 2; 3 4]
2×2 Matrix{Int64}:
1 2
3 4
julia> @dbg 1+2 "Hello" m
Main:REPL[3]:1 1 + 2 = 3
Main:REPL[3]:1 "Hello" = "Hello"
Main:REPL[3]:1 m = [1 2; 3 4]