title: How to make VScode launch.json for a Python module
body: <p>I'm reseaching <a href="https://github.com/facebookresearch/swav" rel="noreferrer">self-supervised muchine learning code</a>.</p>
  <p>And I have wanted to debug the code with <code>python debugger</code> not <code>pdb.set_trace()</code>.
  This is python command for ubuntu terminal.</p>
  <pre class="lang-sh prettyprint-override"><code>python -m torch.distributed.launch --nproc_per_node=1 main_swav.py \
  --data_path /dataset/imagenet/train \
  --epochs 400 \
  --base_lr 0.6 \
  --final_lr 0.0006 \
  --warmup_epochs 0 \
  --batch_size 8 \
  --size_crops 224 96 \
  --nmb_crops 2 6 \
  --min_scale_crops 0.14 0.05 \
  --max_scale_crops 1. 0.14 \
  --use_fp16 true \
  --freeze_prototypes_niters 5005 \
  --queue_length 380 \
  --epoch_queue_starts 15\
  --workers 10
  </code></pre>
  <p>In order to debug the code with VScode, I tried to revise launch.json like below as referring <a href="https://stackoverflow.com/questions/46102228/how-to-debug-a-python-module-in-visual-studio-codes-launch-json">stackoverflow -question</a></p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;Python: Current File&quot;,
              &quot;type&quot;: &quot;python&quot;,
              &quot;module&quot;: &quot;torch.distributed.launch --nproc_per_node=1 main_swav.py&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;console&quot;: &quot;integratedTerminal&quot;,
              &quot;args&quot;: [&quot;--data_path&quot;, &quot;/dataset/imagenet/train&quot;]
          }
      ]
  }
  </code></pre>
  <p>I knew this would not work... TT</p>
  <p>Could you give me some advice?</p>
  <p>Thank you for your time.</p>