title: How to print all variables values when debugging Python with pdb, without specifying each variable?
body: <p>I'm debugging my Python scripts using <em>pdb</em> and the manual says I can use <strong>p variables</strong> command to print the values of the specified variables at a certain point. But what if I had lots of variables, like 20 variables, and I would like to track the value of all of them? How do I print all of them without specifying each one manually? Take for example this script:</p>
  
  <pre><code>a = 1
  b = 2
  c = 3
  </code></pre>
  
  <p>I can debug it with pdb and print all of them using <strong>p a, b, c</strong> like this:</p>
  
  <pre><code>$ python -m pdb test.py 
  &gt; /media/test.py(1)&lt;module&gt;()
  -&gt; a = 1
  (Pdb) n
  &gt; /media/test.py(2)&lt;module&gt;()
  -&gt; b = 2
  (Pdb) n
  &gt; /media/test.py(3)&lt;module&gt;()
  (Pdb) n
  --Return--
  &gt; /media/test.py(3)&lt;module&gt;()-&gt;None
  -&gt; c = 3
  (Pdb) p a, b, c
  (1, 2, 3)
  (Pdb) 
  </code></pre>
  
  <p>But I have to manually specify each variable. Is there a way of print all variables at once, without specifying each one of them?</p>