how to use debugger in PyCharm

Answered

I apology s but don't know how to use the py charm debugger, i'm struggling on learn how to use for past weeks 

 

I can't get the debugger to stop at the breakpoints, I can't get step through my code, i can't get the debugger to view my variables and I don't know what debugger is doing, all it did was, acting a like running program. It did display message; 

 

C:\Users\Sk\AppData\Local\Programs\Python\Python37\python.exe C:/Users/Sk/Desktop/project/FrounterWeb/zigview/views.py 1A
Traceback (most recent call last):
File "C:/Users/Sk/Desktop/project/FrounterWeb/zigview/views.py", line 2, in <mo
dule>
from zigview.models import tank_system
File "C:\Users\Sk\Desktop\project\FrounterWeb\zigview\models.py", line 3, in <m
odule>
class user(models.Model):
File "C:\Users\Sk\AppData\Local\Programs\Python\Python37\lib\site-packages\djan
go\db\models\base.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "C:\Users\Sk\AppData\Local\Programs\Python\Python37\lib\site-packages\djan
go\apps\registry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "C:\Users\Sk\AppData\Local\Programs\Python\Python37\lib\site-packages\djan
go\apps\registry.py", line 131, in check_apps_ready
settings.INSTALLED_APPS
File "C:\Users\Sk\AppData\Local\Programs\Python\Python37\lib\site-packages\djan
go\conf\__init__.py", line 57, in __getattr__
self._setup(name)
File "C:\Users\Sk\AppData\Local\Programs\Python\Python37\lib\site-packages\djan
go\conf\__init__.py", line 42, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, bu
t settings are not configured. You must either define the environment variable DJ
ANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Process finished with exit code 1

 

I apologize again, but the setting up config or getting it to run I, just don't understand and i try the document written.  

 

1
4 comments

Hi,

What is your PyCharm version?

Please attach screenshots of your Run/Debug Configuration (Run | Edit Configurations...) and Settings/Preferences | Languages & Frameworks | Django.

1
Avatar
Permanently deleted user

Hi Sergey Karpov thanks for helping me 

 

My Pycharm version should be 2.4 if i'm not wrong

and below is screen shots you requested

Run/Debug Configuration-screenshots

Settings/Preferences | Languages & Frameworks -screen shots (I can't find anything about django)

Here the screen shots of debug errors

0

Thanks!

You are using Community edition which doesn't have Django support. Please use Professional edition for that.
See full comparison https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html

1
Avatar
Permanently deleted user

Thanks 

Sergey Karpov 

Will do 

0

Please sign in to leave a comment.