Doraemon mini program debugger
A debugging tool that supports small programs
Development background
For small program developers and test students, many temporary debugging functions need to be independently developed to support, such as viewing small program information, mobile phone information and user information, scanning code to open the page. These functions are similar for each small program and need to be developed separately for similar requirements.
Our internal precipitation by carding these common functions, forming A collection – doraemon applet server-side debugging tools, in the form of universal tool open external, make every little program can quickly access the function of the general and has nothing to do with the business code, such as H5 arbitrary door, small program basic information, location simulation and so on.
Simple summary
Doraemon small program side debugging tool, built-in many common tools, avoid repeated implementation, one access, you will have a powerful tool set.
Results demonstrate
Doraemon small program end home effect demonstration
Built-in function modules
- The app information
It is used to quickly view the basic information of mobile phone system information, basic information of small program, user information, authorization information and other basic information, avoiding repeatedly opening the mobile phone Settings or calling the native API of small program for viewing.
- Position simulation
- Cache management
- H5 arbitrary door
You can open h5 page in small program by scanning code and pasting links, simple and convenient operation
- An updated version
When your small program code update, in order to obtain the latest online package need to restart the small program, this function can click the update operation on your small program, directly access to the latest remote code resources
Quick learning
Before using
Before starting to use it, you need to read the relevant documentation of wechat mini program custom components.
How to use
- through
npm
The installationnpm install -s -d dokit-miniapp
- And then from node_modules
dist/
Copy the directory to your own project and use it as follows
Introduce the component in page.json, the page that needs to reference the tool
"usingComponents": {
"dokit": ".. /.. /dist/index/index"
}
Copy the code
Use components in page.wxml
<dokit/>
Copy the code
You can register dependent pages in app.json as follows
"pages": [
"dist/appInformation/appInformation"."dist/debug/debug"."dist/h5door/h5door"."dist/logs/logs"."dist/positionSimulation/positionSimulation"."dist/storage/storage"."dist/index/index"
]
Copy the code
Please delete the reference in the production environment because the micro program does not support development environment and production environment
Subsequent planning
Performance tools (with the following features)
1. Small program loading time 2. Home page rendering time 3Copy the code
Visual tools
Control check 2. Interface request performance analysis 3. Cache file manager 4. Enable the management toolCopy the code
contribution
Any comments or suggestions are welcome to issue
Making the address
Github.com/didi/Doraem…