From 4def89ebb5fd1453e4a430e2d7a719f126c82506 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Nov 2019 16:53:26 +0530 Subject: [PATCH] Add a note on debugging custom kittens --- docs/kittens/custom.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/kittens/custom.rst b/docs/kittens/custom.rst index b4fe7e33f..19c4f79c5 100644 --- a/docs/kittens/custom.rst +++ b/docs/kittens/custom.rst @@ -130,6 +130,18 @@ layout, by simply adding the line:: to the ``handle_result()`` function, above. + +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 ``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. +So if you run kitty from another kitty instance, the output will be visible +in the first kitty instance. + .. _external_kittens: Kittens created by kitty users