javascript - 用node做微信公众号开发,如何做本地调试
伊谢尔伦
伊谢尔伦 2017-04-11 11:28:23
[JavaScript讨论组]

我现在用node做一个人微信公众号的开发,我用的是新浪云服务器,代码用git上传到新浪云服务器上了,调试在哪里调试呀?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(2)
天蓬老师

新浪云node容器吗?
我用了一段时间,也是微信公众号。不过成本有点高。
本地调试的话用花生壳做映射,然后公众号url地址填花生壳给你分配的域名即可。
什么工具无所谓,反正主要是把你本地映射到公网就ok

PHP中文网

升级到新版本的nodejs

node --inspect index.js

然后浏览器打开远程调试地址


我最喜欢的就是上文档
https://nodejs.org/api/debugg...

V8 Inspector Integration for Node.js#
NOTE: This is an experimental feature.

V8 Inspector integration allows attaching Chrome DevTools to Node.js instances for debugging and profiling.

V8 Inspector can be enabled by passing the --inspect flag when starting a Node.js application. It is also possible to supply a custom port with that flag, e.g. --inspect=9222 will accept DevTools connections on port 9222.

To break on the first line of the application code, provide the --debug-brk flag in addition to --inspect.

如果你的代码上到服务端了,你把相应的端口转发出来就行了

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号