Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable debug output?

Tags:

julia

I tried printing something to the debug log, but I see no output:

julia> @debug "foo"

How can I enable debug output?

like image 654
David Varela Avatar asked Jan 16 '20 05:01

David Varela


People also ask

How can I see debug output?

To see the debug output window, in Microsoft Visual Studio, click View, click Other Windows, and then click Output. You can view the debug output in this window only if the debugger is attached to the process that is writing to the output window.

How do I enable debug logs?

Navigate to Event Viewer (Local)\Applications and Service Logs\Microsoft\User Experience Virtualization\App Agent. Right-click on Debug under App Agent and select Enable Log. Select OK when presented with the "Analytic and Debug logs may lose events when they are enabled.

What is a debug output?

Debug Output is an OpenGL feature that makes debugging and optimizing OpenGL applications easier. Briefly, this feature provides a method for the driver to provide textual message information back to the application.


1 Answers

Use the JULIA_DEBUG environment variable to set debug output.

Set the value to the name of the module for which you want to enable debug logging:

julia> ENV["JULIA_DEBUG"] = Base

For the case of @debug calls in the REPL, set the module to Main:

julia> ENV["JULIA_DEBUG"] = Main
Main

julia> @debug "foo"
┌ Debug: foo
└ @ Main REPL[6]:1

The special all value will enable debug logging for all modules:

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

If want to enable debugging during startup, you can set it through the shell:

$ JULIA_DEBUG=all julia
like image 76
David Varela Avatar answered Sep 22 '22 16:09

David Varela