# wx.setEnableDebug(Object object)
Start from base library version 1.4.0. Please remaining backward compatible.
with Promise style call: Supported
Need page permissions: Mini Programs cannot call this interface from a plugin page, and plugins cannot call the interface from the plugins page
Mini Program plugin: Not supported
Sets whether the debug switch is turned on. This switch also works for the official version.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
enableDebug | boolean | yes | Turn on debugging | |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# sample code
// Turn on debugging
wx.setEnableDebug({
enableDebug: true
})
// Close debugging
wx.setEnableDebug({
enableDebug: false
})
# Tips
- In the official version to open debugging there is a way that is first in the development version or the experience version of the open debugging, and then cut to the formal version can see vConsole.