diff --git a/docs/kittens/custom.rst b/docs/kittens/custom.rst index 19c4f79c5..7e4e1aeae 100644 --- a/docs/kittens/custom.rst +++ b/docs/kittens/custom.rst @@ -135,7 +135,15 @@ Debugging kittens -------------------- The part of the kitten that runs in ``main()`` is just a normal programs and -the output of print statements will be visible in the kitten window. +the output of print statements will be visible in the kitten window. Or +alternately, you can use:: + + from kittens.tui.loop import debug + debug('whatever') + +The ``debug()`` function is just like ``print()`` except that the output +will appear in the stdout of the kitty process inside which the kitten is +running. The ``handle_result()`` part of the kitten runs inside the kitty process. The output of print statements will go to the ``STDOUT`` of the kitty process.