title: Can I use Python Debugger In Bazel Test
body: <p>I am trying to debug my tests using pdb (Python debugger) while running them with bazel.</p>
  
  <p>This is a sample test I have:</p>
  
  <pre><code>class TestMembersResource(TestCase):
  
      def test_get(self):
          response = self.client.get('/api/v1/members/')
          import ipdb; ipdb.set_trace()
          self.assertEqual(response.status_code)
  </code></pre>
  
  <p>When I try to run it with <code>bazel test ...</code> I get the following output:</p>
  
  <pre><code>Traceback (most recent call last):
      File "/root/.cache/bazel/_bazel_root/ae988d93859d448ae36776fcb135b36c/execroot/__main__/bazel-out/k8-fastbuild/bin/webserver/members/api/tests/test_members_resource.runfiles/__main__/webserver/members/api/tests/test_members_resource.py", line 22, in test_get
      self.assertEqual(response.status_code, 200,
      File "/root/.cache/bazel/_bazel_root/ae988d93859d448ae36776fcb135b36c/execroot/__main__/bazel-out/k8-fastbuild/bin/webserver/members/api/tests/test_members_resource.runfiles/__main__/webserver/members/api/tests/test_members_resource.py", line 22, in test_get
      self.assertEqual(response.status_code, 200,
      File "/usr/lib/python2.7/bdb.py", line 49, in trace_dispatch
      return self.dispatch_line(frame)
      File "/usr/lib/python2.7/bdb.py", line 68, in dispatch_line
      if self.quitting: raise BdbQuit
  BdbQuit
  </code></pre>
  
  <p>Without pdb everything works pretty smooth.</p>
  
  <p>Is there a way to get an interactive shell and use the standard pdb commands with bazel test?</p>
  
  <p>Thanks!</p>