Solved by ErikJ in post #3 
              
              
                I got the solution from PyCharm forums. I needed to disable the " Attach to subprocess automatically while debugging " option(Source).Thank you anyways