From 8bf1da2760eb41dcaecc2367e00dc6273793b65f Mon Sep 17 00:00:00 2001 From: Andras Kovi Date: Tue, 4 Oct 2016 12:29:44 +0200 Subject: [PATCH] Describe vital details for debugging in PyCharm Describe the settings required to be able to debug Mistral in in PyCharm. Change-Id: Id70078d40d7d6958435d9a39e46f00c4735411f1 Signed-off-by: Andras Kovi --- README.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.rst b/README.rst index ee6000aca..1463ff978 100644 --- a/README.rst +++ b/README.rst @@ -270,6 +270,28 @@ and run the following command in *pdb*, *PyDev* or *PyCharm*:: mistral/cmd/launch.py --server all --config-file etc/mistral.conf --use-debugger +.. note:: + + In PyCharm, you also need to enable the Gevent compatibility flag in + Settings -> Build, Execution, Deployment -> Python Debugger -> Gevent + compatible. Without this setting, PyCharm will not show variable values + and become unstable during debugging. + + +Running unit tests in PyCharm +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to be able to conveniently run unit tests, you need to: + +1. Set unit tests as the default runner: + + Settings -> Tools -> Python Integrated Tools -> Default test runner: Unittests + +2. Enable test detection for all classes: + + Run/Debug Configurations -> Defaults -> Python tests -> Unittests -> uncheck + Inspect only subclasses of unittest.TestCase + Running examples ~~~~~~~~~~~~~~~~