Werkzeug Debugger in OctoPrint

I've worked with Flask before and one of my favorite features of Flask is that there is a web debugger that gives the developer the ability to open a Python Terminal in the browser when an exception is raised (and it can be manually induced with raise). I often use the terminal to test methods and debug with access to all of the app variables in that given point in time. I would like the same with OctoPrint because I feel it would save lots of time in plugin development because I can interact with the class methods directly instead of using a bunch of octoprint._logger.info statements. Is there any way to do this in OctoPrint?

This technique might work. Read through all that.

@OutsourcedGuru, I read over that, but I’m not sure exactly what to do with it.

I’m wondering if @foosel might know anything about this.