在Heroku上交互调试Node.js应用程序? [英] Interactively debugging a Node.js application on Heroku?
问题描述
我不能使用node-inspector进行调试,因为它需要三个端口, Heroku只允许一个端口。
我不能使用Node.js内置的调试器,因为我需要一个CLI来发出调试命令。
http:// nodejs.org/api/debugger.html#debugger_debugger
在Heroku上交互调试Node.js应用程序的最佳策略是什么? / strong>
找到一次性Dynos,允许:
< blockquote>
Runn使用控制台(也称为REPL shell)运行任意代码或根据实时数据库检查应用程序的模型。 (例如rails console,irb或node)
https://devcenter.heroku.com/articles/one-off-dynos#types-of-one-off-dynos
我没有时间测试,但这应该让我运行内置的节点调试器。
My Node.js application runs correctly locally but it has errors once deployed to Heroku.
I cannot use node-inspector to debug as it requires three ports, and Heroku allows only one port.
I cant use the debugger built into Node.js because I need a CLI to issue debugging commands.
http://nodejs.org/api/debugger.html#debugger_debugger
What is the best strategy for interactively debugging a Node.js application on Heroku?
Found One-Off Dynos, which allow:
Running a console (also known as a REPL shell) to run arbitrary code or inspect the app’s models against the live database. (e.g. rails console, irb, or node)
https://devcenter.heroku.com/articles/one-off-dynos#types-of-one-off-dynos
I didn't have time to test, but this should let me run the built in node debugger.
这篇关于在Heroku上交互调试Node.js应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!