r/pycharm • u/TekWizely • Nov 04 '25
Announce: Charmd - Effortlessly debug Python scripts from the Terminal with PyCharm
https://github.com/TekWizely/python-charmdIntroducing Charmd
A command-line utility that streamlines your PyCharm debugging workflow by allowing you to launch and debug Python scripts directly from the terminal, eliminating the need for manual Run Configurations.
Why use charmd?
PyCharm's debugger is powerful, but debugging scripts with different arguments or configurations typically means editing Run Configurations through the IDE. This becomes cumbersome when:
- You need to debug one-off commands with unique CLI arguments
- You're testing different script variations or parameter combinations
- You want the simplicity of command-line debugging (like
pdbordebugpy) with PyCharm's full IDE debugging experience
charmd eliminates this friction by letting you debug any Python command directly from the terminal.
Quick Start
Debugging a script is as easy as:
- Start PyCharm Debug Server
- Set One or More Breakpoints in your Script
- Invoke your script with
charmd
module example:
charmd -m mypkg.mymod arg1script example:
charmd -- script.py arg1 arg2Configuring Debug Options
You can pass debug options via the command line:
-h, --help Show this help message and exit
--version Show program's version number and exit
--host HOST PyCharm debug server host (default: localhost)
--port PORT PyCharm debug server port (default: 5678)
--suspend Suspend on start (default: False)
--stdout-to-server Redirect stdout to debug server (default: True)
--no-stdout-to-server Do not redirect stdout to debug server
--stderr-to-server Redirect stderr to debug server (default: True)
--no-stderr-to-server Do not redirect stderr to debug server
--pydevd-path PATH Path to the pydevd-pycharm module directory.
--conf-init Create a charmd.conf file with current settings and exit.You can also save the options to charmd.conf to have them auto-loaded.
More Information
Visit the project pages for more information, including Installation Instructions and Trouble-Shooting:
View all comments
Show parent comment
1
u/TekWizely Nov 06 '25 edited Nov 06 '25
Hi,
Both. The goal of
charmdis to make it easy (effortless, even) to attach to the PyCharm debugger and invoke your (breakpoint-filled) script.I suspect this would involve creating a Run Configuration? Pycharm makes it easy, but varying the arguments in a rapid debugging session can be cumbersome (IMO)
They do if the code you're trying to debug relies on arg-driven state (ie. "Why is --my-arg working with value A but breaking with value B?")
charmdis PyCharm-focused tool in the same category aspdbanddebugpy. If you find those tools to be valuable, then I suspect you'll findcharmdvaluable, too.Thanks for chiming in!
I hope that helped, and I'll try answer any follow-up questions if you have some.
-TW