title: How to stop execution of python script in visual studio code?
body: <p>I have the following code which I am running from within Visual Studio Code using <code>Right click &gt; Run Python File in Terminal</code></p>
  
  <pre><code>import threading
  
  
  def worker(tid):
      """This is what the thread actually executes"""
      for i in range(tid * 100000):
          print("I'm working on thread {} with count {}".format(tid, i))
      return
  
  
  def main():
      threads = list()
      for i in range(32):
          t = threading.Thread(target=worker, args=(i,))
          threads.append(t)
          t.start()
  
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>However I want to stop the execution of the script so I have tried with <code>Ctrl+C</code> but the program is still running in the integrated terminal of Visual Studio Code. Is there a way to actually force the stop?</p>