Break points not working
Hi all,
I'm having a problem with the PyCharm debugger - break points have stopped working. Specifically - execution no longer stops at any break point in a django project. I created a simple non-django project and was able to use break points just fine, however in my old and any new django projects break points simply do not work. I think this problem started when I created a new virtualenv and added that new virtualenv as a new Python Interpreter in the PyCharm settings. Not 100% sure, but it seems that after that my break points stopped working. I have removed that virtualenv/Python Interpreter and things still don't work.
Has anyone else run into a problem like this and solved it? Any help would be greatly appreciated.
I'm running PyCharm 1.2.1 (although the problem started in 1.2) on the latest Mac OS X with python 2.6.1.
Thanks,
Russ
Please sign in to leave a comment.
Hello Russell,
Could you please show the command line generated by PyCharm when you run
your Django application under a debugger?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
/Users/russn/.virtualenvs/lincolnloop/bin/python /Applications/PyCharm 1.2.1.app/helpers/pydev/pydevd.py --client 127.0.0.1 --port 59763 --file manage.py runconcurrentserver localhost:8000
Hello Russell,
This is a known issue: http://youtrack.jetbrains.net/issue/PY-3378
The debugging will work if you don't use the 'runconcurrentserver' command.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
THANK YOU SO MUCH!!! I've been suffering without the debugger for weeks now. I'm so happy to have it back!
Hi,
I have the exact same problem, but I'm not running with any custom commands. This is what the console shows:
I have created a new fresh django project and the debugger stop on view's breakpoint so I think I have misconfigured something but I don't have any clue to where or what look for
Please any help will be appreciated
Hi Hugo,
so debugger DO stop on view's breakpoint or NOT?
And if it not, tell me, please, what is view file path and are there symliks in the project?
Hi Dmitry,
In any new project the debugger stops on breakpoints, but only on my current project don't, so I don't know what (setting/application/middleware??) is disabling the breakpoint.
Here is my config window:
And here some relevant settings:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'core.custom_context.root_path',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
#'django.contrib.admindocs',
'jquery_validation',
'tinymce',
'pruebas_hugo',
'sorl.thumbnail',
'label_values',
'core',
'services',
'request_service',
'list_service',
'accounts',
'captcha',
'bitly',
)
One last thing: Im sending emails from a different thread using this snippet:
t = threading.Thread(target=_send_email,
args=['Subject', 'Body', settings.DEFAULT_FROM_EMAIL, [settings.DEFAULT_BCC_EMAIL, ]])
t.setDaemon(True)
t.start()
Attachment(s):
foxido_conf.jpg
The same problem here. Running PyCharm 2.5 with a google appengine project + Python 2.7. Threadsafe is set to yes in my app.yaml file.
No breakpoint stops the running code.
I've created the project on top of existing codebase, and tried to set up everything under the projects' settings, but probably miss something.
I run django using
.../.virtualenvs/gae/bin/python manage.py testserver --addrport 8000
or
.../.virtualenvs/gae/bin/python manage.py runserver 8000
Neither of them stopped for breakpoints.
This is my program code I am running it in PyCharm community edition
('Connecting to ', '127.0.0.1', ':', '57373')('Connected.',)
debugger: received >>99 -1 57374
<<
Received command: ??? 99 -1 57374
('Connecting to ', '127.0.0.1', ':', '57374')('Connected.',)
debugger: received >>501 1 0.1 WIN
<<
Received command: CMD_VERSION 501 1 0.1 WIN
Had the same problem with standard server run parameters. Did File -> Invalidate caches and restart and the problem seems to be gone.
Hi,
I have the same problem since I installed version 2016 on my Mac El Capitan. I tried all of the above including a clean install but it didn't help.
My config is:
/Users/nicolas/odoo-env/bin/python "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 59616 --file /Users/nicolas/Sites/odoo10/odoo/odoo-bin -c ../gp.conf -d v10lgi2 -u gp_property -u gp_tenancy
pydev debugger: process 76610 is connecting
Connected to pydev debugger (build 163.10154.50)
2017-01-21 08:41:24,428 76610 INFO ? odoo: Odoo version 10.0
2017-01-21 08:41:24,428 76610 INFO ? odoo: Using configuration file at /Users/nicolas/Sites/odoo10/gp.conf
2017-01-21 08:41:24,429 76610 INFO ? odoo: addons paths: ['/Users/nicolas/Library/Application Support/Odoo/addons/10.0', u'/Users/nicolas/sites/odoo10/odoo/addons', u'/Users/nicolas/sites/odoo10/local_addons/gp', u'/Users/nicolas/sites/odoo10/community_addons', u'/Users/nicolas/sites/odoo10/community_addons/odoo-account', u'/Users/nicolas/sites/odoo10/community_addons/partner-contact', '/Users/nicolas/Sites/odoo10/odoo/odoo/addons']
2017-01-21 08:41:24,429 76610 INFO ? odoo: database: odooe9@default:default
2017-01-21 08:41:24,458 76610 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8070
Can you help? Thanks.
Problem below is solved. Fundamental ignorance about debugging functions.
Rule for newbies: You can't put a function in a py file and just plain old debug it. After the function, you have to call it.
Instead of having just the function below, I should have added this line after the function:
Then a right mouse and "Debug..." would have stopped at my break point.
Kind of same problem, but simpler.
I'm a Spyder refugee, just installed PyCharm CE this morning to use in a class. Mainly I just want to run debug and step through code. So I make a new "project". Then create a new py file:
I put a break point at the line with "for I in ..."
Right mouse, select the "Debug <file_name>..." and get this in the console window:
None of the debug icon light up.
I tried this earlier, and it stopped at the break point. Since I'm floundering around watching the intro video and trying things out, I have no idea what i might have changed. Surely another newbie has encountered the same thing.
How do I get debug back?