While debugging, you may need an interactive console at hand. Switch to Console in the Debug tool window, and then click Show Debug Console in the toolbar on the left.

The console becomes interactive, which means that you can enter commands and view the output.

To make the interactive console always available, go to Settings/Preferences | Build, Execution, Deployment | Console and enable the Always show Debug Console checkbox.