Recently I have been working on the development of WeChat public accounts, but when an error occurred when debugging on a mobile phone, nothing was replied. Debugging by logging was too inefficient, so this small tool software was born.
Function introduction:
When developing the WeChat public platform, most of them use their mobile phones to send messages through WeChat, and then use logs to record some debugging information. , because once our WEB program has an error or times out, the result will not be visible on the WeChat mobile phone. Using this small tool, you can solve this problem. Even if it times out (the WeChat server only gives 5 seconds), there is no need to be afraid. Of course, it is best not to time out.
1.Request URLRequest URL Enter the URL you used in the public platform development mode (as shown below). This tool does not have a signature verification algorithm, so there is no need to fill in the Token. Yes, but in WEB programs we need to verify signatures for security reasons. Therefore, you have to add parameters that only you know, such as debug=true, so that the WEB program does not perform signature verification, so that you can skip the verification. Sign the part for debugging. You can save up to 3 request URLs, each of which records the last submitted parameters to facilitate debugging between multiple servers.
2.FromUserName When a user sends a message to a public account, the WeChat server will send the unique ID used to identify the user every time. , and the unique identification of the public account will also be sent. The text box above the Submit button displays the content submitted by the simulated WeChat server to our WEB server. You can see FromUserName and ToUserName.
3.ToUserName is similar to FromUserName above.
4.Text/Voice/Picture/Location/Follow/Unfollow/MenuThese options simulate the type of message sent by the user, and the actual message content is filled in by yourself
5.Submit buttonNeedless to say this
6.Automatically disconnect in 5 seconds checkboxSimulates the timing mechanism of the WeChat server, which will not be used for general requests More than 5 seconds, but sometimes requests that exceed 5 seconds do occur. I have experienced this myself. This happens with some specific operations, so this is also useful.
7.Response content No need to explain this
8.Clear response content buttonNo need to explain this
More articles related to the release and introduction of WeChat public account development and debugging tools Please pay attention to PHP Chinese website!