I have been using PyCharm for a bit so I am not an expert.
How I normally ran my programs was with the terminal like so:
program.py -t input1 -t1 input2
I was wondering how can I debug this?
For other programs I wrote, I did not have any arguments so debugging was simply setting break points and pressing debug.
Go to your project properties, either by right-clicking on the project and picking "Properties" or by picking Properties from the Project menu. Click on Debug, then enter your arguments into the "Script Arguments" field. Save.
To view debug information on the monitor terminal, perform the following tasks: Execute the terminal monitor and terminal debugging commands. Enable the information center (enabled by default). Use a debugging command to enable the related debugging.
Menu: Run
-> Edit configurations
-> "+" (add new config)
-> Python
.
Script name: program.py
If you need to debug a script from installed packages, such as tox
, you can specify the full path too. For example: Script name: /home/your_user/.envs/env_name/bin/tox
Above /home/your_user/.envs/env_name
is a path to virtual environment containing tox
package.
Script params: -t input1 -t1 input2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With