1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Title: Environment variables
Slug: environment-variables
# List of environment variables
WebKit uses several environment variables, most of which are designed for developers or debugging purposes. These variables should be used carefully, as they can impact the behavior of the software. These environment variables and their behavior are not guaranteed to remain stable across versions of WebKit. Always ensure that your WebKit version corresponds to the documentation you are referencing to avoid compatibility issues.
## Debugging Variables
- `WEBKIT_DEBUG`
Defines a comma-separated list of logging channels and their levels for WebKit's debugging output. Logging channels correspond to specific areas of functionality, such as networking, storage, and scrolling. For detailed usage, refer to [WebKit's Logging Guide](https://docs.webkit.org/Build%20%26%20Debug/Logging.html).
- **Enabling a channel**: Specify the channel's name with an optional level (e.g., `Loading=warning` outputs warnings and errors for the Loading channel).
- **Disabling a channel**: Prefix the name with a minus sign (`-`) (e.g., `all,-Network` enables all channels, except Network).
- **Enabling all channels**: Use the wildcard `"all"` as the content of `WEBKIT_DEBUG`.
- **Child processes**: The same configuration is shared to child processes spawned by the browser, like the `WebProcess` and `NetworkProcess`.
- **WebDriver-related channels**: In addition to the browser, the WebDriver service executable also uses WebKit's logging infrastructure, defining the following channels:
- `WebDriverClassic` - For the HTTP-based [WebDriver](https://w3c.github.io/webdriver/) Classic prototol.
- `WebDriverBiDi` - For the WebSockets-based [WebDriver BiDi](https://github.com/w3c/webdriver-bidi) protocol.
- `SessionHost` - For messages related to the management of the Browser under automation.
#if WPE
## Graphics-related variables
- `WPE_DRM_DEVICE`
Specifies the primary device that WebKit will use for gpu buffer allocation when it needs access to the main device. It is interesting for DRM backend. You need to specify a file path.
Example: `/dev/dri/card0`
- `WPE_DRM_RENDER_NODE`:
Specifies the render device that WebKit will use for buffer allocation, this is the one used for allocating general gpu buffers. You need to specify a file path.
Example: `/dev/dri/renderD128`
- `WPE_DMABUF_BUFFER_FORMAT`:
You can ask WebKit to try to use a format instead the one that is recommended by the underlying system (wayland, drm, etc.), when you define this variable then no other data is going to be used from wayland so it is recommended to also define the drm devices. The value must follow the following format: `pixel_format:memory_layout:usage`:
- Pixel format, specifies the pixel format as a fourcc code, example: `AR24`
- Memory layout, defines the memory layout of the buffer, 0 for linear layout
- Usage, indicates how the buffers is going to be used: `rendering`, `mapping` and `scanout`
Example: `AR24:0:scanout`
#endif
## Remote Web Inspector Variables
- `WEBKIT_INSPECTOR_SERVER`: The address and port in `ip:port` format (e.g.
`127.0.0.1:10000`) where the remote inspector service will listen for
connections.
- `WEBKIT_INSPECTOR_HTTP_SERVER`: The address and port in `ip:port` format
where the remote inspector service will listen for HTTP connections.
See [Remote Web Inspector](remote-inspector.html) for more details.
|