Code

Opened 3 years ago

Last modified 3 years ago

#15249 new New feature

Provide access to a debugger within the development server

Reported by: lxsameer Owned by: lxsameer
Component: Core (Other) Version: 1.2
Severity: Normal Keywords: inline debugger
Cc: lxsameer@…, alex@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Sometimes a django project did not raise any exception but things are not going as well as we want. so it will be a good idea to
to run an interactive shell or pdb shell where we want in code or when an exception raised. the patch that i provide add an settings variable called "INLINE_DEBUGGER", that gets to value "interactive" and "pdb" and its default value is None.

if user set "INLINE_DEBUGGER" to "interactive" then when an exception raised a python interactive shell or ipython shell will executed with the exception locals. so user can easily test some condition in his/her code.

if user set "INLINE_DEBUGGER" to "pdb", when an exception raised django will execute a pdb shell with the exception locals.

forgive me because of my poor English

Attachments (2)

inline_debug.diff (2.9 KB) - added by lxsameer 3 years ago.
inline debug patch
inline-debug.diff (3.0 KB) - added by lxsameer 3 years ago.

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by lxsameer

inline debug patch

comment:1 Changed 3 years ago by lxsameer

  • Cc lxsameer@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by lxsameer

  • Summary changed from Inline debugging to [PATCH] Inline debugging

Changed 3 years ago by lxsameer

comment:3 Changed 3 years ago by russellm

  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

As noted on django-dev -- notionally accepted, but the provided patch won't be the way to do it. This isn't something that can be inserted into the base HTTP handler, because that code will end up on production servers.

comment:4 Changed 3 years ago by russellm

  • Summary changed from [PATCH] Inline debugging to Provide access to a debugger within the development server

... and please don't include [patch] in the subject. We know it has a patch -- that's why we have a "has patch" flag on the ticket.

comment:5 Changed 3 years ago by alekam

  • Cc alex@… added

comment:6 Changed 3 years ago by lrekucki

  • Severity set to Normal
  • Type set to New feature

comment:7 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:8 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from lxsameer to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.