Debugging with PyCharm terminal arguments

前端 未结 3 1029
有刺的猬
有刺的猬 2020-12-08 00:36

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 inpu

相关标签:
3条回答
  • 2020-12-08 00:44

    It was almost correct but just needed little correction with full script path.

    Menu: Run->Edit configurations->"+" (add new config)->Python.

    Script name: path + /program.py

    Script params: -t input1 -t1 input2

    0 讨论(0)
  • 2020-12-08 00:55

    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

    0 讨论(0)
  • 2020-12-08 00:59

    Just the image wise representation of answer

    step 1: Click on the Run menu click Edit configuration

    1. Select + in top right corner and select python

    1. Provide the name ,absolutepath of the script/ select the script by clicking three dots(green marker, script paramters and python interpreter

    0 讨论(0)
提交回复
热议问题