I want to use python option -m when i use pycharm debugger

Question:

Hi I got the project on the github, I want to analyze this code using debugging.
The project uses python 3.6 and requires next command when running

python -m pixloc.run_Aachen

pixloc is package (directory) name and run_Aachen is python file name.

When I run this command using Pycharm, It is successful

but When I run this using Pycharm Debug mode, It is fail

the following image is my Run/Debug Configuration

enter image description here

What can I do for this problem

I try to use setuptools.setup(), but this isn’t work
I just want to use -m option in debug

Asked By: S.M.K

||

Answers:

Your run configuration is currently set to to run a Python script (i.e., as python ./path/to/script.py), but you want to execute a module (i.e., python -m package.subpack.mod).

To change your run configuration to one that executes a module, do the following:

  1. Under the run configuration, click on the first dropdown that reads "Script path" and change it to "Module name".

  2. Then, specify pixloc.run_Aachen in accompanying testbox.

Answered By: Brian