Getting Gizmos to draw in my editor window (tool)

I'm working on some automated navigation tools for Unity. I'm creating a EditorWindow, and since I can't debug in unity normally, I want to draw some debug in the scene.

Just as a test, I wanted to draw the bounds of the scene using Gizmos.DrawCube. But EditorWindow class isn't a behavior, so I was wondering how someone would go about this. Would you create some dummy game object, that did the Gizmo rendering for you?

If so, what's the best way to do that via script. Basically, when the build button is hit for my window. I would need to create some object, that I can use for drawing?...What's the unity way to do that (in script)?

To draw Gizmos to the scene the easiest way to do this would be the OnDrawGizmos()method of a MonoBehaviour.

In your case I would create an GameObject and add a visualisation script to it. This would look something like this:

if (GUI.Button("Create/Draw/YourTextHere"))
{
 new GameObject("YourGameObjectNameHere").AddComponent<VisualisationScript>();
}

This would add a new gameobject to the scene and apply the visualisation script to it.
From here on you do all your gizmo drawing in the OnDrawGizmos() of the script