-
Notifications
You must be signed in to change notification settings - Fork 13
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
Added developer debugging tools (#1479) #1508
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! I'll test this Monday. A few quick thoughts for now.
pycharm_debugger.py
Outdated
port=12345, # Use the same port number configured in PyCharm | ||
stdoutToServer=True, | ||
stderrToServer=True, | ||
# suspend=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this option for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've changed that now so it's set better. suspend=True
means it stops at breakpoint()
.
What's really annoying is that by default (suspend=True) the context in your IDE gets moved to this module which takes you away from the code you want to be looking at.
Explicitly setting suspend=False (as I've done now) stops that, it now only stops at the breakpoints set in the gutter.
I've also added an image for the matching pycharm configuration to the docs.
@@ -0,0 +1,3 @@ | |||
-c requirements.txt | |||
django-debug-toolbar | |||
pydevd-pycharm==242.23726.102 # pinned to appropriate version for current pycharm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the argument for pinning this. I can also see an argument for leaving it unconstrained. Either way requires action when any team member upgrades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to not pin it, but it's required that it's pinned at the moment.
The issue is pycharm is very picky about the version of pydevd-pycharm it'll work with at any point in time, and as a good example of this, when I first set this up there was a newer version of pydevd-pycharm, but it wasn't compatible with the current version of pycharm and pycharm will complain if you use it... ¯\_(ツ)_/¯
I see now they released another version 2 hours ago so I'll test if that works soon but for now this is compatible.
c55c35c
to
f233f27
Compare
This adds django debug toolbar and a framework for support for debuggers, with a pycharm setup.