# Troubleshooting PyCharm Debug Egg File Path Configuration in 3DSlicer

**URL:** <https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458>\
**Category:** Development\
**Created:** [December 1, 2024, 6:40am UTC](https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458 "2024-12-01T06:40:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [December 1, 2024, 6:40am UTC](https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458/1 "2024-12-01T06:40:19Z")

</div>

Hello Dear Developers and Users,

OS: Ubuntu 22.04.3 LTS  
Slicer: 5.0.2 r30822  
PyCharm: 2021.3 (Professional Edition)

First, I must mention that unfortunately, I am unable to set the **PyCharm debug egg file path** in the latest version of 3DSlicer, which is 5.6.2. I raised this issue [in my previous report](https://discourse.slicer.org/t/issue-with-debuggingtools-module-on-3d-slicer-v5-6-2-r32448-on-ubuntu-22-04/40339). As a result, I had to switch to 3DSlicer version 5.0.2 that have this setting.

I am following the steps mentioned on the GitHub site regarding the [SlicerDebuggingTools](https://github.com/SlicerRt/SlicerDebuggingTools) module. As shown in the image below, I have configured the PyCharm settings.

I am following the steps mentioned on the GitHub site regarding the SlicerDebuggingTools module. As shown in the image below, I have configured the PyCharm settings.

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/6/56811e368219cfe2a3d5bdda4ca38f3c9288fde1.png)

I have also configured the settings in 3DSlicer.

 ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/3/c393e0168c2a126ccfc4be191cf2da3ceb11eb57.png)

As you can see, the `.egg` file is located at the following path on my system:  
`/home/sn/pycharm-2021.3/debug-eggs/pydevd-pycharm.egg`

Next, I started the Debug Slicer remote debugger in PyCharm.  
PyCharm screenshot:

 ![3](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/c/0c59487ad8a288a2dc0b6ade62b921f0e7550154.png)

In 3DSlicer, I clicked on “Connect to PyCharm Server.”

 ![4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/b/2bc8ae9ba0e11017840d54d12a65ae2f83900135.png)

As you can see, I am encountering the following error:  
**Expected: /home/sn/pycharm-2021.3/debug-eggs/pydevd-pycharm.egg/pydevd\_attach\_to\_process/attach\_linux\_amd64.so to exist.**

I should mention that the compressed file `pydevd-pycharm.egg` located at  
`/home/sn/pycharm-2021.3/debug-eggs/`  
contains the `pydevd-pycharm.egg` file. To investigate this, I extracted the `pydevd-pycharm.egg` file.  
I realized that egg packages can be installed with pip, but it still wasn’t helpful as see below:

 ![5](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/2/722e0e02263dfc6b7e582ea97acfee813b6bea77.png)

Please guide me to solve it. I want to develop and debug my modules in PyCharm.  
Best regards.  
Shahrokh.

---

<div class="post-metadata">

**Author:** ![Amy\_Morton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amy_morton/32/67318_2.png) [@Amy\_Morton](https://discourse.slicer.org/u/Amy_Morton)\
**Post date:** [December 5, 2024, 4:13pm UTC](https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458/2 "2024-12-05T16:13:01Z")

</div>

I’ve been experiencing similar issues getting my Slicer Python Debug connection to PyCharm up and running.

Windows 10 Enterprise 19045.5131  
Slicer 5.6.2  
PyCharm 2024.3 (Pro)

I had previously installed PyCharm 2024.2.4 and encountered the .egg issue. I also found the stackoverflow thread on extracting- but the path wath still pointed to \_attach\_proces… under the .egg dir. I uninstalled .2.4 and installed 2024.3.

In PyCharm I configured the remote debugger

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/1/51c464cbd27764a7f52a39b09947575f24ac90db.png)

and I successfully built the pydev-pycharm within pycharm terminal as instructed:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/e/6edc4222ce4881dc3ff869b001b6171350a051a6.png)

I also noticed in my extension wizard created test module, the vtk and slicer imports showed an error- on a whim I pip import vtk:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/6/869292f86da0cfd7c22c8be206678a4cb7ae53aa.png)

The import pycharm warnings went away…

I updated my .egg path in the 5.6.2 pydebug

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/3/e32ce089dfe2855f7a32df431fe9073ddee3e0f2.png)

Launch the remote debugger

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/a/7ac2c86aa034d47efb06befa0a743d3b48879c67.png)

Try to Connect to PyCharm debugger within Slicer… and the process just hangs…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/8/388cf3e589f4726c8a8a3aeb52f8f765456bd0ce.png)

---

<div class="post-metadata">

**Author:** ![Amy\_Morton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amy_morton/32/67318_2.png) [@Amy\_Morton](https://discourse.slicer.org/u/Amy_Morton)\
**Post date:** [December 5, 2024, 5:59pm UTC](https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458/3 "2024-12-05T17:59:46Z")

</div>

I created incoming and outgoing port forwarding rules, and updated my pycharm interpreter to the PythonSlicer.exe in my 5.6.2 folder

I am still hanging

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 12, 2024, 9:24pm UTC](https://discourse.slicer.org/t/troubleshooting-pycharm-debug-egg-file-path-configuration-in-3dslicer/40458/4 "2024-12-12T21:24:58Z")

</div>

Just for future reference, this was due to a bug in PyCharm. Workaround is described in the extension’s documentation and users may also consider switching to Visual Studio Code.
