PyCharm Setup#
Tips and configuration for developing with PyCharm. The committed .idea/ and .run/ files give you source roots,
run/debug configurations, code style, file templates, and more out of the box — most setup is automatic when you open
the project.
PyCharm Professional is required for debugging (remote debug server). Community edition works for editing and running the app, but cannot attach to the debug server.
Initial Setup#
1. Build the project#
Build first — the build populates _build/ with the Kit SDK, embedded Python interpreter, and all Omniverse
extensions. It also generates .idea/lightspeed-kit.iml from .idea/lightspeed-kit.iml.template (via
tools/utils/update_pycharm_sources.py) with:
Extension source roots — every directory under
source/extensions/for cross-extension importsBuild extra-paths — Kit kernel, extension cache, and pip bundle directories from
_build/(read from.vscode/settings.jsonpython.analysis.extraPaths) grouped by container directory (extscache,extscore) so SDK imports (carb,pxr,omni.usd, etc.) resolve without manual interpreter-path configurationPip prebundle paths — discovered dynamically from
deps/*.tomlfiles that define[[dependency]]sections; the script reads eachtargetfield and finds the matching directories inside build extension directories so that third-party pip packages (pygit2,requests,py7zr, etc.) resolve correctly
The generated .iml is git-ignored; only the template is committed.
.\build.bat
2. Open the project#
Open the repo root in PyCharm. The committed .idea/ files automatically configure:
Source roots — every extension in
source/extensions/plus all_build/SDK paths are registered as source roots for import resolution (generated by the build viatools/utils/update_pycharm_sources.py)Excluded directories —
_build,_compiler,_repo,_testoutput,rtx-remixexcluded from indexingSearch scopes — “Source Extensions” and “Python Extensions” for focused searching (
.idea/scopes/)File types —
.kitfiles recognized as TOML for syntax highlighting (.idea/fileTypes.xml)File templates — new Python files include the SPDX Apache-2.0 license header; new unit tests scaffold an
AsyncTestCaseclass (.idea/fileTemplates/)Ruff — linting enabled project-wide (
.idea/misc.xml)Encoding — UTF-8 default (
.idea/encodings.xml)Required plugins — PyCharm will prompt to install TOML and Shell Script plugins if missing (
.idea/externalDependencies.xml)Module structure — project module mapping (
.idea/modules.xml)
3. Set file template scheme to Project#
The committed file templates (license header, unit test scaffold) only work when the template scheme is set to Project:
Settings (Ctrl+Alt+S) > Editor > File and Code Templates — set the Scheme dropdown (top of the page) to
Project.
4. Configure the Python interpreter#
Point PyCharm to Kit’s embedded Python 3.10:
Settings (Ctrl+Alt+S) > Python > Interpreter > Add Interpreter > Add Local Interpreter — select the
interpreter type and browse to:
_build\windows-x86_64\release\kit\python\python.exe
The build generates all SDK source roots in .idea/lightspeed-kit.iml (from the committed template), so no manual
interpreter-path configuration is needed — all imports (carb, pxr, omni.*, py7zr, pygit2, requests, etc.)
resolve out of the box.
5. Reload sources after a build#
The build regenerates .idea/lightspeed-kit.iml from the template with updated source roots. PyCharm monitors this
file and hot-reloads it — a restart is not required. To pick up the changes:
Alt-Tab away from PyCharm and back — PyCharm refreshes its virtual file system on window focus, which is usually enough.
If that doesn’t work: click the Reload All from Disk toolbar button (or File > Reload All from Disk) to force PyCharm to re-read the
.imland update the project model.
Rebuild (.\build.bat) whenever you add new pip dependencies, update extension dependencies, or add/remove extensions
so that _build/ and the .iml source roots stay in sync.
Run Configurations#
The .run/ folder contains pre-configured run profiles organized into folders. They appear in PyCharm’s run dropdown
automatically:
Run#
Configuration |
Type |
What it does |
Edition |
|---|---|---|---|
Run Remix (Release) |
Shell |
Launches |
Any |
Run Remix (Dev) |
Shell |
Launches |
Any |
Debug#
Configuration |
Type |
What it does |
Edition |
|---|---|---|---|
Debug Remix (Release) |
Compound |
Starts debug server + launches full app with debugger |
Professional |
Debug Remix (Dev) |
Compound |
Starts debug server + launches dev app with debugger |
Professional |
Attach to Debugger |
Remote Debug |
Attaches to PyCharm’s debug server on |
Professional |
Debugging#
Select Debug Remix (Dev) or Debug Remix (Release) from the run dropdown.
Click the Debug button (bug icon).
Set breakpoints and debug normally — the app connects to PyCharm automatically.
These are compound configurations that start PyCharm’s debug server (port 33100) and launch the app with
omni.flux.debug.pycharm in one step.
For general debugging concepts, test debugging, and the debugpy-based alternative, see Debugging Guide.
Formatting & Linting#
Run format_code.bat and lint_code.bat all from the terminal, or wire them as PyCharm external tools for hotkey
integration:
Settings (Ctrl+Alt+S) > Tools > External Tools > + (Add):
Field |
Format Code |
Lint Code |
|---|---|---|
Name |
Format Code |
Lint Code |
Program |
|
|
Arguments |
(leave empty) |
|
Working directory |
|
|
Then assign keyboard shortcuts: Settings (Ctrl+Alt+S) > Keymap > External Tools — right-click the tool and
assign a shortcut.
Project Structure#
Excluded directories#
The following directories are excluded from indexing (defined in .idea/lightspeed-kit.iml.template):
_build, _compiler, _repo, _testoutput, rtx-remix
If you need to exclude additional directories: Settings (Ctrl+Alt+S) > Project > Project Structure — select the
folder and click Excluded.
Tip: Do not use an
_*wildcard pattern to exclude — it will also exclude__init__.pyfiles and break Python resolution.
Search scopes#
Two shared scopes are pre-configured via .idea/scopes/ and available immediately:
Source Extensions —
file:source/extensions//*— all files in project extensionsPython Extensions —
file:source/extensions//*&&file:*.py— only Python files in extensions
Use them in Find in Files (Ctrl+Shift+F) by selecting the scope dropdown. To add custom scopes:
Settings (Ctrl+Alt+S) > Appearance & Behavior > Scopes.
What’s Committed#
Summary of all shared configuration files in the repository:
.idea/ (project settings)#
File |
Purpose |
|---|---|
|
Template for generated |
|
Module mapping |
|
Python SDK type, Ruff enabled |
|
Git VCS mapping |
|
UTF-8 default encoding |
|
|
|
Required plugins (TOML, Shell Script) |
|
SPDX Apache-2.0 license header for new Python files |
|
AsyncTestCase scaffold with license header |
|
Search scope: all extension files |
|
Search scope: Python extension files only |
|
Inspection profile settings |
|
Excludes user-specific files (workspace, tasks, etc.) |
.run/ (run configurations)#
File |
Folder |
Purpose |
|---|---|---|
|
Run |
Launch full app |
|
Run |
Launch dev app |
|
Debug |
Debug full app (Professional) |
|
Debug |
Debug dev app (Professional) |
|
Debug |
Remote debug server connection (Professional) |
Tips#
Widescreen tool window layout#
Enable Settings (Ctrl+Alt+S) > Appearance & Behavior > Appearance > Widescreen tool window layout to prevent
the bottom tool window (terminal, run output, etc.) from spanning the full window width. With this option on, the
left and right side panels (Project, Structure, etc.) extend to full height and the bottom pane only fills the space
between them. This is especially useful on ultrawide or wide monitors where horizontal space is abundant.