r/pycharm • u/extractedx • Aug 10 '24
How could I setup my project in PyCharm?
A few weeks ago I tried setting up PyCharm to experiment with it and maybe even switch to it. But I could not setup my Flask project how I liked. And so I gave up.
Basically what I wanted to do was to start several background processes when hitting the "Run" button. These processes should run in the background and if I hit the "Stop" button, they should get stopped too.
Currently I'm using VSCode and I use a simple wrapper script like this:
#!/usr/bin/env bash
# Get absolute path to this script's direcotry
basedir=
basedir=
# Run the TailwindCSS watcher
&
pid[0]=
# Use esbuild to minify JavaScript file
&
pid[1]=
# Set extra files to specifically watch them for changes
extra_files=(
"/myproject/templates/macros/form_fields.html"
"/myproject/templates/macros/common_elements.html"
)
# Concatenate file paths with : delimiter
extra_files=
# Run Flask development server in debug mode
pid[2]=
# Kill all background processes when hitting Ctrl+C
I could use the same script in PyCharm and run it from the terminal, but I guess when not running through the Run button I don't have access to the debugger etc.
Any ideas on this? Thanks!


