File: debugging.md

package info (click to toggle)
python-pywebview 2.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,376 kB
  • sloc: python: 3,816; cs: 116; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
# Debugging

To debug Javascript, set the `debug` parameter to `True`

``` python
import webview

webview.create_window('https://pywebview.flowrl.com', debug=True)
```

This will enable web inspector on macOS, GTK and QT. To open the web inspector, right click on the page and select Inspect. Unfortunately the Trident web engine on Windows has no web inspector and currently there is no way to attach an external debugger. The `debug` flag enables Javascript error reporting and right-click context menu on Windows.

You can debug Python code normally using your favorite debugger.