Unburied function call monitoring of wechat applets
Sometimes, when faced with a bug, you just can’t understand why.
I had this experience, and it took me an entire evening, but THEN I gave up. Having to log at every possible point and wait for the deployment to fail again was really frustrating!
As a matter of fact, the key to solving a bug is reproduce, and the real deal might be a change of a character or two.
Therefore, being able to know the parameter values when the faulty function was called, as well as the entire function call chain, is very useful to reproduce and understand the bug.
Today, amway is a very good small program bug monitoring plugin, it can monitor function calls and record function parameter values.
Fundebug provides bug monitoring services for websites, wechat mini programs and small games. I have a look, front-end monitoring and game monitoring is also good, there is a chance to try.
Wechat small program plug-in access and access baidu statistics as simple, here I do not cost the mouth.
It’s worth noting that the official documentation for Fundebug says:
The plugin only collects error information by default to protect privacy. Collecting systemInfo and userInfo needs to be configured by the developer.
Similarly, if you want to monitor function calls and record function parameter values, you need to do this manually.
GetPhoneNumber = getPhoneNumber; getPhoneNumber = getPhoneNumber; getPhoneNumber = getPhoneNumber;
The error successfully records the call to getPhoneNumber and the arguments passed in when the error occurred.
Since there is no number in the value of parameter e, it is easy to understand why the error occurred.
reference
- Wechat applets -Fundebug document
- Fundebug: Applet error monitoring supports user behavior backtracking
- The Art of Bug Reporting: How to Market and Get Your Bugs Fixed?
- What do you do when you can’t reproduce a defect?