Quick search


New in version 1.9.1.

Reboot of the old inspector, designed to be modular and keep concerns separated. It also has an addons architecture that allow you to add a button, panel, or more in the Console itself.


This module works, but might fail in some cases. Please contribute!


For normal module usage, please see the modules documentation:

python main.py -m console

Mouse navigation

When the “Select” button is activated, you can:

  • tap once on a widget to select it without leaving inspect mode
  • double tap on a widget to select and leave inspect mode (then you can manipulate the widget again)

Keyboard navigation

  • “Ctrl + e”: toggle console
  • “Escape”: cancel widget lookup, then hide inspector view
  • “Up”: select the parent widget
  • “Down”: select the first child of the currently selected widget
  • “Left”: select the previous sibling
  • “Right”: select the next sibling

Additional information

Some properties can be edited live. However, due to the delayed usage of some properties, it might crash if you don’t handle the required cases.


Addons must be added to Console.addons before the first Clock tick of the application, or before create_console is called. You currently cannot add addons on the fly. Addons are quite cheap until the Console is activated. Panels are even cheaper as nothing is done until the user selects them.

We provide multiple addons activated by default:

  • ConsoleAddonFps: display the FPS at the top-right
  • ConsoleAddonSelect: activate the selection mode
  • ConsoleAddonBreadcrumb: display the hierarchy of the current widget at the bottom
  • ConsoleAddonWidgetTree: panel to display the widget tree of the application
  • ConsoleAddonWidgetPanel: panel to display the properties of the selected widget

If you need to add custom widgets in the Console, please use either ConsoleButton, ConsoleToggleButton or ConsoleLabel.

An addon must inherit from the ConsoleAddon class.

For example, here is a simple addon for displaying the FPS at the top/right of the Console:

from kivy.modules.console import Console, ConsoleAddon

class ConsoleAddonFps(ConsoleAddon):
    def init(self):
        self.lbl = ConsoleLabel(text="0 Fps")
        self.console.add_toolbar_widget(self.lbl, right=True)

    def activate(self):
        self.event = Clock.schedule_interval(self.update_fps, 1 / 2.)

    def deactivated(self):

    def update_fps(self, *args):
        fps = Clock.get_fps()
        self.lbl.text = "{} Fps".format(int(fps))


You can create addon that adds panels. Panel activation/deactivation are not tied to the addon activation/deactivation, but on some cases, you can use the same callback for deactivating the addon and the panel. Here is a simple About panel addon:

from kivy.modules.console import Console, ConsoleAddon, ConsoleLabel

class ConsoleAddonAbout(ConsoleAddon):
    def init(self):
        self.console.add_panel("About", self.panel_activate,

    def panel_activate(self):

    def panel_deactivate(self):

    def deactivate(self):

    def update_content(self, *args):
        widget = self.console.widget
        if not widget:
        text = "Selected widget is: {!r}".format(widget)
        lbl = ConsoleLabel(text=text)

kivy.modules.console.start(win, ctx)[source]

Create an Console instance attached to the ctx and bound to the Window’s on_keyboard() event for capturing the keyboard shortcut.

win: A Window

The application Window to bind to.

ctx: A Widget or subclass

The Widget to be inspected.

kivy.modules.console.stop(win, ctx)[source]

Stop and unload any active Inspectors for the given ctx.

class kivy.modules.console.Console(**kwargs)[source]

Bases: kivy.uix.relativelayout.RelativeLayout

Console interface

This widget is created by create_console(), when the module is loaded. During that time, you can add addons on the console to extend the functionalities, or add your own application stats / debugging module.


True if the Console is activated (showed)

add_panel(name, cb_activate, cb_deactivate, cb_refresh=None)[source]

Add a new panel in the Console.

  • cb_activate is a callable that will be called when the panel is activated by the user.
  • cb_deactivate is a callable that will be called when the panel is deactivated or when the console will hide.
  • cb_refresh is an optional callable that is called if the user click again on the button for display the panel

When activated, it’s up to the panel to display a content in the Console by using set_content().

add_toolbar_widget(widget, right=False)[source]

Add a widget in the top left toolbar of the Console. Use right=True if you wanna add the widget at the right instead.

addons = [<class 'kivy.modules.console.ConsoleAddonSelect'>, <class 'kivy.modules.console.ConsoleAddonFps'>, <class 'kivy.modules.console.ConsoleAddonWidgetPanel'>, <class 'kivy.modules.console.ConsoleAddonWidgetTree'>, <class 'kivy.modules.console.ConsoleAddonBreadcrumb'>]

Array of addons that will be created at Console creation

highlight_at(x, y)[source]

Select a widget from a x/y window coordinate. This is mostly used internally when Select mode is activated


Indicate if the inspector inspection is enabled. If yes, the next touch down will select a the widget under the touch


Display mode of the Console, either docked at the bottom, or as a floating window.


Receive a touch down event.

touch: MotionEvent class

Touch received. The touch is in parent coordinates. See relativelayout for a discussion on coordinate systems.


bool If True, the dispatching of the touch event will stop. If False, the event will continue to be dispatched to the rest of the widget tree.


Receive a touch move event. The touch is in parent coordinates.

See on_touch_down() for more information.


Receive a touch up event. The touch is in parent coordinates.

See on_touch_down() for more information.

pick(widget, x, y)[source]

Pick a widget at x/y, given a root widget


Remove a widget from the toolbar


Replace the Console content with a new one.


Current widget being selected

class kivy.modules.console.ConsoleAddon(console)[source]

Bases: builtins.object

Base class for implementing addons


Method called when the addon is activated by the console (when the console is displayed)

console = None

Console instance


Method called when the addon is deactivated by the console (when the console is hidden)


Method called when the addon is instantiated by the Console

class kivy.modules.console.ConsoleButton(**kwargs)[source]

Bases: kivy.uix.button.Button

Button specialized for the Console

class kivy.modules.console.ConsoleToggleButton(**kwargs)[source]

Bases: kivy.uix.togglebutton.ToggleButton

ToggleButton specialized for the Console

class kivy.modules.console.ConsoleLabel(**kwargs)[source]

Bases: kivy.uix.label.Label

LabelButton specialized for the Console