BlackStartx / PyCharm-Blender-Plugin

A PyCharm Plugin that simplify the development of Blender Add-On inside the PyCharm IDE.
MIT License
151 stars 12 forks source link

Fix broken Debug mode due to bad .egg path #18

Closed Brainzman closed 1 year ago

Brainzman commented 1 year ago

This patch addresses issues #17, #11, and #9 with a simple fix for the Debug mode. Currently, computing the path to the pydevd-pycharm.egg file can fail, effectively disabling the Python remote debug server on the Blender side.

Instead of computing the .egg file path by trying to guess it from a Java class source file parent directory, the IDE root folder is now directly obtained from the IntelliJ SDK.

Tested and confirmed to work on macOS 13.4.1, using PyCharm Professional Edition 2023.2 and Blender 3.6

BlackStartx commented 1 year ago

Hi Brainzman~ ^-^ 🌺

First of all, thanks so much for a better and more elegant solution! That file has never been touched since it's release 2 years ago and I guess young me was just rushing for a working solution~

Oh, and glad to hear that debug mode is now working on macOS! I have never tested my addon compatibility with other OS, hope it's not causing any other issues on Mac~

Thanks so much for the fix~ ♥


P.S: I've tested this on Windows and it's working just as fine, so I'll probably release a 2023.2.1 version soon!