16

I'm trying to debug a test using nosetests in PyCharm. I need to stop at a breakpoint and do some interactive debugging using the PyCharm debug console. However, whenever I type anything at the debug console prompt, nothing is printed; I just get a new prompt. The debug console works perfectly with pytest, but I need to use nosetests for this particular test. How can I get the console to work correctly?

LateCoder
  • 2,163
  • 4
  • 25
  • 44
  • Duplicate: https://stackoverflow.com/questions/17806099/pycharm-unit-test-interactive-debug-command-line-doesnt-work?rq=1 – Inti Nov 02 '17 at 16:49

3 Answers3

20

Most likely your nose runner suppressing stdout. Try running nosetests with -s

Oleksiy
  • 6,337
  • 5
  • 41
  • 58
11

Under the "Tools" menu, select "Edit Configurations." In the dialog, expand "Python tests" and select the nosetests you are running. Add "-s" as an "Additional Argument".

2

Under the Tools menu, select Edit Configurations. In the dialog, expand Python tests and select the nosetests you are running. On the Configuration tab, under the Nosetests section, make sure the checkbox in front of Params is checked and then add -s as a parameter to it. Apply and Save.

Bhushan
  • 18,329
  • 31
  • 104
  • 137