Based heavily on this old guide by TimLinux http://linfiniti.com/2012/09/remote-debugging-qgis-plugins-using-pycharm/
- In PyCharm click menu "Run -> Edit Configurations" (Or click Edit Configurations in the dropdown in the toolbar)
- Click the plus to add a new "Python Remote Debug" config
- Name the config. Use port 53100 (Could probably be any high port)
- Add to the python code:
import sys
sys.path.append('/home/j/.IntelliJIdea2019.3/config/plugins/python/pydevd-pycharm.egg')