Skip to content

Commit

Permalink
Update README, and merge Kozea#14
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Jul 3, 2013
1 parent befedeb commit 5b77900
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,27 @@ For wsgi servers you can use the `WdbMiddleware`:
or using Flask:

```python
from flask import Flask
from wdb.ext import WdbMiddleware
app = Flask(__name__)
app.debug = True
app.wsgi_app = WdbMiddleware(app.wsgi_app)
app.run(use_debugger=False) # Disable builtin Werkzeug debugger
```

you can also use the [Flask-Wdb](https://github.com/techniq/flask-wdb/) extension

```python
from flask import Flask
from flask_wdb import Wdb

app = Flask(__name__)
app.debug = True
Wdb(app)

app.run()
```

##### Django

or using django:
Expand Down Expand Up @@ -135,6 +149,27 @@ And in your `settings.py`, activate exception propagation:
DEBUG_PROPAGATE_EXCEPTIONS = True
```

##### CherryPy

or using CherryPy:

```python
import cherrypy
from wdb.ext import WdbMiddleware

class HelloWorld(object):
@cherrypy.expose
def index(self):
undefined_method() # This will fail
return "Hello World!"

cherrypy.config.update({'global':{'request.throw_errors': True}})
app = cherrypy.Application(HelloWorld())
app.wsgiapp.pipeline.append(('debugger', WdbMiddleware))

cherrypy.quickstart(app)
```

#### Tornado

In tornado, which is not a wsgi server, you can use the `wdb_tornado` function which will monkey patch the execute methon on RequestHandlers:
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,27 @@ For wsgi servers you can use the `WdbMiddleware`:
or using Flask:

```python
from flask import Flask
from wdb.ext import WdbMiddleware
app = Flask(__name__)
app.debug = True
app.wsgi_app = WdbMiddleware(app.wsgi_app)
app.run(use_debugger=False) # Disable builtin Werkzeug debugger
```

you can also use the [Flask-Wdb](https://github.com/techniq/flask-wdb/) extension

```python
from flask import Flask
from flask_wdb import Wdb

app = Flask(__name__)
app.debug = True
Wdb(app)

app.run()
```

##### Django

or using django:
Expand Down

0 comments on commit 5b77900

Please sign in to comment.