title: How to debug a Python module in Visual Studio Code's launch.json
body: <p>My question may seem simple but, I have a module that I launch in a terminal like this:</p>
  <pre class="lang-sh prettyprint-override"><code>python -m my_module.my_file
  </code></pre>
  <p>How do I debug this in Visual Studio Code?</p>
  <p>I have this in my <code>launch.json</code> (<a href="https://code.visualstudio.com/docs/languages/python" rel="noreferrer">documentation</a>)</p>
  <pre><code>&quot;type&quot;: &quot;python&quot;,
  &quot;request&quot;: &quot;launch&quot;,
  &quot;pythonPath&quot;: &quot;D:\\ProgramData\\Anaconda3\\envs\\simulec\\python.exe&quot;,
  &quot;args&quot;: [
     &quot;-m&quot;,
     &quot;my_module.my_file&quot;,
  ]
  </code></pre>
  <p>If I don't set the <code>program</code> option or if I set it to <code>&quot;&quot;</code> I get &quot;File does not exist&quot; Error.</p>
  <p>How can I fix this?</p>