Difference between run and debug in Python

Answered

Hello, 
I am working on Debian with Intellij for my python project (there are reasons why I don't use pycharm). 
I have an issue with the debug tool in Python. 
The 'run' configuration works as expected, but for some reason with the same configuration the python debugger does not recognize installed packages in my conda environment (as if they are not present). 
Could you explain me what is the difference between the run and the debug in that specific use? 
I am wondering if they manage differently the interpreter.

0
6 comments

Hi,

The debugger should work with your script the same way it works when you run it.

Perhaps there is a misconfiguration or yet unknown bug. Did you create your run configuration manually or just right-clicked the file and chose Run?

0

Hello,

Thanks for the answer.

That's what I understood since it takes the same configuration.

Also I have created the configuration manually to run my script with the several parameters.

It uses the same interpreter, so that is quite weird that it does not work the same.

Do you have an idea on possible reasons why it is different?

0

Could you share a screenshot showing your project structure and run configuration?

0

I cannot really share that :/

I know this is not ideal, that's why I was just looking for some ideas on this issue.

Anyway Thank you :)

EDIT: Small update. In reinstalling my project a 4th time, it works now :D

I still don't know why it was different in the first 3 try.

0

What do you mean by "reinstalled project"?

Removed .idea and configured the project in PyCharm?

0

No, actually my project involves several packages in development, that I need to import manually.

Also I need to create the conda environment outside and then import it to Intellij.

So I did that several times and the last time, both run and debugger worked.

I don't know why but still ><

0

Please sign in to leave a comment.