Debugging Django tests within Pycharm
Hi,
I recently switched to using Pycharm and loving it so far however I am having a problem debugging my nose tests within the IDE. The tests are executed fine and I can see the output and success/failures in the Debug console however when I set a breakpoint in the test code it is never hit.
Breakpoints function totally fine when I debug the Django App itself and set them in application code.
I was wondering if anybody else was able to debug test code using Pycharm and if so could you recommend a run configuration that would allow this functionality.
Previous to using Pycharm I would run tests like so, I would like to execute tests using the same type of runner but with the ability to step through the tests.
$: python manage.py test project –settings=project.settings.test
Thanks.
I recently switched to using Pycharm and loving it so far however I am having a problem debugging my nose tests within the IDE. The tests are executed fine and I can see the output and success/failures in the Debug console however when I set a breakpoint in the test code it is never hit.
Breakpoints function totally fine when I debug the Django App itself and set them in application code.
I was wondering if anybody else was able to debug test code using Pycharm and if so could you recommend a run configuration that would allow this functionality.
Previous to using Pycharm I would run tests like so, I would like to execute tests using the same type of runner but with the ability to step through the tests.
$: python manage.py test project –settings=project.settings.test
Thanks.
1 comment
Sort by
Date
Votes

I don't use nose, but breakpoints in tests (including django tests) do work for me as long as I invoke them with the "Debug" action instead of the "Run" action.


Please sign in to leave a comment.