Why is PyCharm debugging so slow?

Problem

Open edX is a very large code base, and sometimes debugging using PyCharm can be very slow.

Solution

Try the following steps to see if it helps PyCharm's performance:
  1. Ensure that you have given PyCharm enough memory
    • See the wiki page PyCharm for details
  2. Ensure that the Cython debugger speedups are installed
    • The first time you run the PyCharm debugger, it will output a message like this:

      warning: Debugger speedups using cython not found. Run '"/edx/app/edxapp/venvs/edxapp/bin/python" "/edx/app/edxapp/edx-platform/.pycharm_helpers/pydev/setup_cython.py" build_ext --inplace' to build.
    • Execute the code within the single quotes on your devstack, being sure to include the double quotes
  3. Set the environment variable DISABLE_MIGRATIONS when running tests
  4. Remove the Django Toolbar