May 20, 2021 WeChat Mini Program Development Document
Cloud development provides on-premises debugging of cloud functions, providing an on-premises node.js cloud function operating environment that is consistent with the line, allowing developers to debug cloud functions on-premises, and using on-premises debugging can improve development and debugging efficiency:
Local debugging also provides special debugging capabilities, including network panel support for demonstrating HTTP requests and cloud development requests, calling diagram presentations, hot overloading when local code is modified, and more, helping developers better develop debugging cloud functions. Details of the features can be found below.
It is recommended that developers will use local debugging test before the development phase and go online to deploy.
More detailed documentation Click here to view.
From WeChat Developer Tools 1.02.1905302 and foundation 2.7.1, the cloud development request (database, cloud function, file storage, etc.) is displayed in the small program NetWork panel, and the API name is displayed when presenting in the NetWork panel.(WX.Cloud.uploadFile and WX.Cloud.DownloadFile except), there is a special request type Cloud, which will display the environment ID of the actual request, request body (database call, show the SDK syntax), JSON package,Time-consuming, and call the stack.
Note: The implementation of the development interface in the developer tool is different from the client, and the time consumption in the developer tool is generally slower than the client. The test results in a particular environment is that the client will be faster than the developer tool.Around 33%.
The following is an example:
Database Details Example:
Example of a return package:
Starting with WeChat developer tools 1.02.1905302 and the base library 2.7.1, in the small program debugger, if wx.cloud.init is used, the default calling environment used in the currently configured widget is output in the debugger.