Comments (2)
maybe this is an option, and could you please consider this modification, as it maybe very important to others who doesn't output text/html.
https://github.com/fjctlzy/flask-debugtoolbar/blob/master/flask_debugtoolbar/__init__.py
hope you could update this code.
from flask-debugtoolbar.
Changing the content type and appending HTML to a JSON response seems like it would break most clients of the JSON API. Also, you are sending the toolbar HTML for all other mime types, which would break sending other content, like images as a response.
There is a proposal in pull request #26 that I'm considering which would allow you to provide a callback that would receive the toolbar content on each request. You could use that to save the toolbar responses somewhere that you could later visit to debug.
I'm closing this as a duplicate of #26.
from flask-debugtoolbar.
Related Issues (20)
- quickstart broken link
- Not working for subdmains - blocked by chrome/firefox because of http instead of https HOT 2
- '_request_ctx_stack' is deprecated and will be removed in Flask 2.3 HOT 3
- Breaks with Flask 2.3.0 (okay with 2.3.1) HOT 1
- Scrollbar not appearing HOT 1
- More help with reviewers/committers/maintainers? HOT 3
- flask-debugtoolbar is incompatible with newest version of werkzeug. HOT 2
- 0.13.1 breaks with Flask 3.0: ImportError: cannot import name '_request_ctx_stack' from 'flask.globals HOT 7
- 0.13.1 breaks on werkzeug 3: Response' object has no attribute 'charset HOT 1
- Drop support for Flask < 2.2.0 (and implicitly Python < 3.7) HOT 2
- Add a basic integration test that ensures the python package is installable HOT 5
- ReadTheDocs builds are broken HOT 2
- Address Flask 3.0 deprecation warnings on using __version__ (to be removed in Flask 3.1) HOT 2
- sql_select/sql_explain not working with Flask-SQLAlchemy 3 & SQLAlchemy 2 HOT 1
- SQLAlchemy 0 queries on swagger
- Update Codemirror files
- New release HOT 4
- NameError: 'debug_enables_record_queries' on visiting Flask routes when toolbar enabled HOT 1
- Toggle `DEBUG_TB_INTERCEPT_REDIRECTS` from the toolbar HOT 3
- Support for `host_matching` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-debugtoolbar.