

English
Set whether to enable the debug switch. This switch also works for the official version.
Platform Difference Description
App | H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 抖音小程序、飞书小程序 | QQ小程序 | 快手小程序 | 京东小程序 |
---|---|---|---|---|---|---|---|---|
x | x | √ | x | √ | x | √ | x | √ |
OBJECT DESCRIPTION
Attribute | Type | Required | Description | Platform Difference Description |
---|---|---|---|---|
enableDebug | boolean | yes | whether to enable debugging | |
success | function | No | Callback function for successful API call | WeChat applet |
fail | function | No | Callback function for API call failure | WeChat applet |
complete | function | No | The callback function of the end of the interface call (the call will be executed if the call succeeds or fails) | WeChat applet |
// turn on debugging
uni.setEnableDebug({
enableDebug: true
})
// turn off debugging
uni.setEnableDebug({
enableDebug: false
})