title: Why doesn't this Python keyboard interrupt work? (in PyCharm)
body: <p>My Python try/except loop does not seem to trigger a keyboard interrupt when Ctrl + C is pressed while debugging my code in PyCharm. (The same issue occurs when using Ctrl + C while running the program, but not in the PyCharm Python console.)</p>
  <p>My code look like this:</p>
  <pre class="lang-py prettyprint-override"><code>try:
      while loop:
          print(&quot;busy&quot;)
  
  except KeyboardInterrupt:
      exit()
  </code></pre>
  <p>The full code can be viewed <a href="https://gist.github.com/shardros/61901ba8a70caf0a12b00b3a61b2a88e" rel="nofollow noreferrer">here</a>. The code above produces the same error.</p>