silenceper / wechat

WeChat SDK for Go (微信SDK:简单、易用)
https://silenceper.com/wechat/
Apache License 2.0
4.74k stars 1.09k forks source link

[咨询] Debugging miniprogram from sandbox #703

Closed ErshovYS closed 5 months ago

ErshovYS commented 1 year ago

Hello! I try to run examples from https://silenceper.com/wechat/ and https://github.com/gowechat/example/tree/master, it works fine, but I don't understand, how to debug wechat-go-server in wechat app? I tried to use wechat-dev-tools (with js) and I could use function remote debug or preview to see my miniprogram in wechat app.

P.S. I read wechat documentation, but I found information about dev-tools only.

ourines commented 10 months ago

see https://developers.weixin.qq.com/miniprogram/dev/devtools/project.html#本地设置

如果已经使用silenceper/wechat,完成了服务端的接口开发,那么你需要在微信开发者工具中将不校验域名打开。 https://developers.weixin.qq.com/miniprogram/dev/devtools/project.html#本地设置 如果涉及到消息回调,可能需要使用内网穿透工具与nginx的流量镜像配合。 如果需要设置ip白名单,而本地ip会动态改变那么需要设置代理服务器

[机器翻译] If you have used silenceper/wechat and completed the interface development of the server, then you need to open the unverification domain name in the WeChat developer tool.

https://developers.weixin.qq.com/miniprogram/dev/devtools/project.html#本地设置

If it involves message callback, you may need to use the intranet penetration tool to work with nginx's traffic mirroring.

If you need to set the IP whitelist, and the local IP will change dynamically, you need to set up a proxy server.