# Pycharm Configuration – Multiple isolated devstacks

**URL:** <https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656>\
**Category:** Development\
**Created:** [July 6, 2020, 7:00pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656 "2020-07-06T19:00:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Trabookis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zachary_trabookis/32/753_2.png) [@Zachary\_Trabookis](https://discuss.openedx.org/u/Zachary_Trabookis)\
**Post date:** [July 6, 2020, 7:00pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/1 "2020-07-06T19:00:59Z")

</div>

I’m trying to figure out how to use the PyCharm debugger again with an open-release version of edX. I followed directions for setting up PyCharm to work with devstack here [https://github.com/edx/devstack/blob/open-release/juniper.master/docs/pycharm\_integration.rst](https://github.com/edx/devstack/blob/open-release/juniper.master/docs/pycharm_integration.rst) but I’m unable to get it all working. Prior to performing [Multiple isolated devstacks on the same host](https://discuss.openedx.org/t/multiple-isolated-devstacks-on-the-same-host/2277) update the PyCharm debugger seemed to work.

Getting 404 page not found errors about the `edx-ui-toolkit` JS resources from the devstack LMS `/login` page. Any clues on what’s going wrong? Those files do exist in the file path.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/f/f6a27b8ea674b6abb6040e65a62a2a8f2911ab22.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/4/46803bbbd45a6c815cebabcea8462c43044bcfa8.png)

It appears that [http://courses.edx.devstack:18000/static/edx-ui-toolkit/js/utils/html-utils.js](http://courses.edx.devstack:18000/static/edx-ui-toolkit/js/utils/html-utils.js) doesn’t resolve but rather produces a 404 page not found error.

---

<div class="post-metadata">

**Author:** ![Zachary\_Trabookis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zachary_trabookis/32/753_2.png) [@Zachary\_Trabookis](https://discuss.openedx.org/u/Zachary_Trabookis)\
**Post date:** [July 6, 2020, 7:15pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/2 "2020-07-06T19:15:27Z")

</div>

I noticed that several Django settings had `/opt/project/edx-platform` rather than `/edx/app/edxapp/edx-platform`. Also the Docker LMS container path at `/opt/project/edx-platform/node_modules/` is an empty directory. I’m thinking that the PIPELINE\_JS base\_vendor for `node_modules/edx-ui-toolkit` is breaking.

I wonder if this has to do with this mapping.

> <https://github.com/edx/devstack/blob/open-release/juniper.master/docker-compose-host.yml#L25>

```auto
COMMON_ROOT	
Path(u'/opt/project/edx-platform/common')

COURSES_ROOT	
Path(u'/opt/project/data')

DEFAULT_TEMPLATE_ENGINE	
{'APP_DIRS': False,
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [Path(u'/opt/project/edx-platform/lms/templates'),
          Path(u'/opt/project/edx-platform/common/templates'),
          Path(u'/opt/project/edx-platform/common/lib/capa/capa/templates'),
          Path(u'/opt/project/edx-platform/common/djangoapps/pipeline_mako/templates'),
          Path(u'/opt/project/edx-platform/common/static')],

ENV_ROOT	
Path(u'/opt/project')

NODE_MODULES_ROOT	
Path(u'/opt/project/edx-platform/node_modules')

NODE_PATH	
u'/opt/project/edx-platform/common/static/js/vendor:/opt/project/edx-platform/node_modules'

OPENEDX_ROOT	
Path(u'/opt/project/edx-platform/openedx')

PIPELINE_JS
'base_vendor': {'output_filename': 'js/lms-base-vendor.js',
                 'source_filenames': ['common/js/vendor/jquery.js',
                                      'common/js/vendor/jquery-migrate.js',
                                      'js/vendor/jquery.cookie.js',
                                      'js/vendor/url.min.js',
                                      'common/js/vendor/underscore.js',
                                      'common/js/vendor/underscore.string.js',
                                      'common/js/vendor/picturefill.js',
                                      'edx-ui-toolkit/js/utils/global-loader.js',
                                      'edx-ui-toolkit/js/utils/string-utils.js',
                                      'edx-ui-toolkit/js/utils/html-utils.js',
                                      'common/js/vendor/require.js',
                                      'js/RequireJS-namespace-undefine.js',
                                      'js/vendor/URI.min.js',
                                      'common/js/vendor/backbone.js']},

REPO_ROOT	
Path(u'/opt/project/edx-platform')

STATICFILES_DIRS	
[Path(u'/opt/project/edx-platform/common/static'),
 Path(u'/opt/project/edx-platform/lms/static'),
 Path(u'/opt/project/edx-platform/node_modules/@edx')]

```

---

<div class="post-metadata">

**Author:** ![Zachary\_Trabookis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zachary_trabookis/32/753_2.png) [@Zachary\_Trabookis](https://discuss.openedx.org/u/Zachary_Trabookis)\
**Post date:** [July 6, 2020, 8:13pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/3 "2020-07-06T20:13:15Z")

</div>

Seems to be an issue with staticfiles when running the PyCharm run/debug configuration. These 404 errors don’t seem to be happening when running `make dev.up` command.

---

<div class="post-metadata">

**Author:** ![kmccormick](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/kmccormick/32/8982_2.png) [@kmccormick](https://discuss.openedx.org/u/kmccormick)\
**Post date:** [July 7, 2020, 1:29pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/4 "2020-07-07T13:29:49Z")

</div>

Sorry @Zachary_Trabookis, I’ve been on vacation for the week, and now I’m starting on a new team, so I haven’t had any time to dig into this (I don’t use PyCharm myself). I will let you know if I get some time to dig into this, but don’t count on me.

---

<div class="post-metadata">

**Author:** ![Zachary\_Trabookis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zachary_trabookis/32/753_2.png) [@Zachary\_Trabookis](https://discuss.openedx.org/u/Zachary_Trabookis)\
**Post date:** [July 7, 2020, 1:32pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/5 "2020-07-07T13:32:04Z")

</div>

@kmccormick No problem. If you or someone else at EdX knows how to do this with PyCharm that would be great. They can respond to this post or this Slack thread [https://openedx.slack.com/archives/C48CG81N0/p1594124158000100](https://openedx.slack.com/archives/C48CG81N0/p1594124158000100).

---

<div class="post-metadata">

**Author:** ![Zachary\_Trabookis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/zachary_trabookis/32/753_2.png) [@Zachary\_Trabookis](https://discuss.openedx.org/u/Zachary_Trabookis)\
**Post date:** [July 7, 2020, 11:42pm UTC](https://discuss.openedx.org/t/pycharm-configuration-multiple-isolated-devstacks/2656/6 "2020-07-07T23:42:30Z")

</div>

> For now I’m leaning more toward VS Code to debug `edx-platform` LMS service on `devstack_docker` rather than PyCharm. Let me know if anyone is able to get PyCharm working but in case anyone else is interest please look at this post from Open Craft [Tutorial: Attaching Visual Studio Code to Devstack LMS Container](https://discuss.openedx.org/t/tutorial-attaching-visual-studio-code-to-devstack-lms-container/458) on how to debug with VS Code.

- [Use Docker Compose to work with multiple containers](https://code.visualstudio.com/docs/containers/docker-compose)
- [Configure and troubleshoot debugging of Python apps running in a Docker container](https://code.visualstudio.com/docs/containers/debug-python)

**PyCharm Debugging Status**  
At the moment I’ve got stuck here working with PyCharm. I tried setting up a symlink from `/opt/project/edx-platform/node_modules` → `/edx/app/edxapp/edx-platform/node_modules` but I got an error that there were

```auto
root@lms:/opt/project/edx-platform# cd node_modules
bash: cd: node_modules: Too many levels of symbolic links

```

Here is the Make target that I used to create the symbolic link manually.

```auto
# ./devstack/Makefile
lms-node-modules-link:
docker-compose exec lms bash -c 'mkdir -p /opt/project/edx-platform && ln -nsf /edx/app/edxapp/edx-platform/node_modules /opt/project/edx-platform/'

```
