# Why isn't the debug logging triggered when \`JULIA\_DEBUG\` is being set to a Main submodule?

**URL:** https://discourse.julialang.org/t/why-isnt-the-debug-logging-triggered-when-julia-debug-is-being-set-to-a-main-submodule/100050
**Category:** General Usage
**Tags:** logging
**Created:** [June 8, 2023, 12:18pm UTC](https://discourse.julialang.org/t/why-isnt-the-debug-logging-triggered-when-julia-debug-is-being-set-to-a-main-submodule/100050 "2023-06-08T12:18:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)
#### Post date: [June 8, 2023, 12:18pm UTC](https://discourse.julialang.org/t/why-isnt-the-debug-logging-triggered-when-julia-debug-is-being-set-to-a-main-submodule/100050/1 "2023-06-08T12:18:01Z")

</div>

```julia
julia> module Temp
           function f()
               @debug "in here"
               return
           end
       end
Main.Temp

julia> ENV["JULIA_DEBUG"]=Main.Temp
Main.Temp

julia> Temp.f()

julia> ENV["JULIA_DEBUG"]=Main
Main

julia> Temp.f()
┌ Debug: in here
└ @ Main.Temp REPL[1]:3

```

Why was the debug message not printed when `JULIA_DEBUG` was set to `Main.Temp`?
