KeyboardInterrupt when using PyCharm debugger for a PyTorch project

I am getting strange KeyboardInterrupt errors when debugging a PyTorch project with PyCharm. Below is the kind of error I am getting:


This only happens when I debug, the code is running fine otherwise. I am using the following wersion of PyCharm:
DeepinScreenshot_select-area_20190318153306

Did anyone experience anything similar before? Any tip will help, thank you!

@ErikJ Can you send your debugger configuration? I mean the right top corner of PyCharm.
image

And something like this:

I got the solution from PyCharm forums. I needed to disable the " Attach to subprocess automatically while debugging " option(Source).Thank you anyways :slight_smile: