Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging in Pycharm with django-nose not working #281

Open
flyudvik opened this issue Apr 2, 2017 · 2 comments
Open

Debugging in Pycharm with django-nose not working #281

flyudvik opened this issue Apr 2, 2017 · 2 comments

Comments

@flyudvik
Copy link

flyudvik commented Apr 2, 2017

I can not run debugger in Pycharm with default configuration.
test runner just ignores breakpoints.

Django==1.10.6
coverage==4.3.4
nose==1.3.7
django-nose==1.4.4

I'm using following configuration

NOSE_ARGS = [
    '--with-coverage',
    '--cover-package=foo,bar',
    '--detailed-errors',
    '-s'
]

Added -s option by following answer on this question on stackoverflow

What am I doing wrong?

@aliva
Copy link

aliva commented Oct 11, 2017

It seems pycharm has some kind if conflict with --with-coverage option, commenting that line fixed the problem for me

@nirgilboa
Copy link

Ran into this, adding my solution:

import sys
RUNNING_WITH_DEBUGGER = True if sys.gettrace() is not None else False

NOSE_ARGS = [
    '--with-xunit',
    '--xunit-file=nosetests.xml',
]

if not RUNNING_WITH_DEBUGGER:
    NOSE_ARGS.extend([
        '--cover-erase',
        '--with-xcoverage',
        '--xcoverage-file=coverage.xml',
        '--cover-package=testDjangoApp',
    ])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants