Debugging django feeds

I'm trying to include django feeds in my next project, but I have problems with debugging. I tried the pycharms debugger as well as pdb, but it did not hit the breakpoints.

+4
source share
2 answers

Take a look at the django feeds panel. This is a django debug toolbar plugin . You can add django-channels-panel to this to add channel debugging functionality to your project. This ensures that you can transfer data when your application is in development mode.

https://github.com/Krukov/django-channels-panel

Installation [Django debug toolbar]

pip install django-debug-toolbar

settings.py

INSTALLED_APPS = [
    # ...
    'django.contrib.staticfiles',
    # ...
    'debug_toolbar',
]
MIDDLEWARE = [
    # ...
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    # ...
]

urls.py

from django.conf import settings
from django.conf.urls import include, url

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]

DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.versions.VersionsPanel',
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.headers.HeadersPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
    'debug_toolbar.panels.templates.TemplatesPanel',
    'debug_toolbar.panels.cache.CachePanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
]

[ Django]

   pip install django-channels-panel

   add 'channels_panel' to your INSTALLED_APPS in settings.py

   add 'channels_panel.panel.ChannelsDebugPanel' to your DEBUG_TOOLBAR_PANELS
+3

PYCHARM_DEBUG = , .

, , PYCHARM_DEBUG .

0

Source: https://habr.com/ru/post/1654390/


All Articles