...where you first want to break. If the code is in a test, instead use
import pytest; pytest.set_trace()
To run tests and bring up pdb for failing tests, you can instead pass --pdb:
$ ./pants tests/python/pants_test/tasks: --pdb
Thanks! I've gone [1]. Now when I right click a test_no_targets method, and select Debug 'test_build_graph' in the menu, it fails with:/Users/jinfeng/workspace/github-pants/build-support/pants_dev_deps.venv/bin/python "/Users/jinfeng/Library/Application Support/IntelliJIdea13/python/helpers/pydev/pydevd.py" --multiproc --client 127.0.0.1 --port 61127 --file /Users/jinfeng/workspace/github-pants/tests/python/pants_test/graph/test_build_graph.pypydev debugger: process 25831 is connectingConnected to pydev debugger (build 135.1230)Traceback (most recent call last):File "/Users/jinfeng/Library/Application Support/IntelliJIdea13/python/helpers/pydev/pydevd.py", line 1733, in <module>debugger.run(setup['file'], None, None)File "/Users/jinfeng/Library/Application Support/IntelliJIdea13/python/helpers/pydev/pydevd.py", line 1226, in runpydev_imports.execfile(file, globals, locals) # execute the scriptFile "/Users/jinfeng/workspace/github-pants/tests/python/pants_test/graph/test_build_graph.py", line 20, in <module>from pants_test.base_test import BaseTestFile "/Users/jinfeng/workspace/github-pants/tests/python/pants_test/base_test.py", line 12, in <module>import unittest2ImportError: No module named unittest2Process finished with exit code 1Any PYTHONHOME/PYTHONPATH setting I did incorrectly in the IntelliJ Setup?
