Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the replacement for debug function in Julia?

Tags:

julia

julia> debug("hello")
ERROR: UndefVarError: debug not defined
Stacktrace:
 [1] top-level scope at REPL[6]:1

even tried with docker can't find suitable replacement.

help?> debug
search: @debug

Couldn't find debug
Perhaps you meant @debug, @enum, big or detach
  No documentation found.

  Binding debug does not exist.
like image 903
Mayank Khurana Avatar asked Mar 13 '26 01:03

Mayank Khurana


1 Answers

Use the @debug macro to print debug output.

You have to enable debug output for you to actually see it. You can enable it with the env variable JULIA_DEBUG:

julia> @debug "hello"

julia> ENV["JULIA_DEBUG"] = "all"
"all"

julia> @debug "hello"
┌ Debug: hello
└ @ Main REPL[4]:1
like image 175
David Varela Avatar answered Mar 18 '26 16:03

David Varela



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!