title: Showing the stack trace from a running Python application
body: <p>I have this Python application that gets stuck from time to time and I can't find out where.</p>
  
  <p>Is there any way to signal Python interpreter to show you the exact code that's running? </p>
  
  <p>Some kind of on-the-fly stacktrace?</p>
  
  <p><strong><em>Related questions:</em></strong></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/1156023/print-current-call-stack-from-a-method-in-python-code">Print current call stack from a method in Python code</a></li>
  <li><a href="https://stackoverflow.com/questions/6849138/check-what-a-running-process-is-doing-print-stack-trace-of-an-uninstrumented-py">Check what a running process is doing: print stack trace of an uninstrumented Python program</a></li>
  </ul>