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:

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.

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: