1

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

S.M.K
  • 15
  • 4

1 Answers1

1

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.

Brian61354270
  • 8,690
  • 4
  • 21
  • 43
  • OH, Thank you for your fast Answer! – S.M.K Feb 14 '23 at 02:23
  • I have a question, -m option is written in Interpreter option? – S.M.K Feb 14 '23 at 02:23
  • @S.M.K Yes, [`-m` is a interpreter option](https://docs.python.org/3/using/cmdline.html#cmdoption-m). You can read more about the effects of running a file as a script vs as a module in [this answer](https://stackoverflow.com/a/14132912/11082165). – Brian61354270 Feb 14 '23 at 02:26
  • Wow... I'm so thankful that I don't know what to do. I just accepte your answer. Thank you so much. Now, I can study the paper Thank you – S.M.K Feb 14 '23 at 02:29