How to set variables on the fly from the console?
===

I would like to set variables on the fly using the console.

My code is wrapped like this:

    ( function () {
    
    var debug = true;
    
    // code here
    
    } () )

I want to change `debug` on the fly using the console.

Should I move `debug` out of the self executing wrapper and pass it in using the global import?

Should I give the anonymous function a name, and set it using the "name spaced" name?

I have not used the console too much, but I assume it is made for things like this.

How is this usually done? What is best practice?