Using the debugger with argparse parameters

Answered

Whenever I run an application, I always pass my parameters into the app with a run.sh script. I have recently started using the pycharm debugger (which I think is great), but I have no idea how to use this debugger in my normal workflow. That is, how do I use my run.sh script in conjunction with the debugger?

0
2 comments

Hi Feuerbach, unfortunately, it's not easy to combine bash and Python scripts in PyCharm. The easiest way is to move parameters from bash script to Parameters field in the Python script Run Configuration.

If it's impossible you can either run your script in the terminal and attach to Python process with Run | Attach to Process or use Debug Server as described in https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#remote-debug-config This way your Python script will connect to the running Debugger process.

2

Thanks for your help. 

0

Please sign in to leave a comment.