简体   繁体   English

使用 Node-RED 查看完整的消息调试

[英]See full msg debug with Node-RED

I'm running an application on Bluemix using Node-RED.我正在使用 Node-RED 在 Bluemix 上运行一个应用程序。 I added a debug node to output the complete msg object, but it is being truncated in the debug console.我将调试节点添加到 output 完整的消息 object,但它在调试控制台中被截断了。 How can I see the complete object?怎样才能看到完整的object?

You can have the output sent to the console as well as the debug tab by checking a box in the debug node's config. 通过选中调试节点的配置中的复选框,可以将输出发送到控制台以及“调试”选项卡。 The whole object will be sent to the console 整个对象将被发送到控制台

The current debug tab will always truncate, but there are some plans to possibly add a separate debug window that could show the whole message. 当前的调试选项卡将始终截断,但是有一些计划可能会添加一个单独的调试窗口来显示整个消息。 Also have a look in settings.js as I believe the character limit for when to truncate is set there, so if it's just too short you can increase it a bit. 也可以在settings.js中查看,因为我相信在那里设置了截断时间的字符数限制,因此,如果它太短,可以增加一点。

EDIT: 编辑:

I'd missed the bluemix tag earlier. 我之前错过了bluemix标签。 To view the console log you need to use the cf command to tail the output. 要查看控制台日志,您需要使用cf命令结尾输出。 eg for a app called node-red you would run the following: 例如,对于名为node-red的应用,您将运行以下命令:

cf logs node-red

Not sure if you can access your settings.js file but if you do, look for the debugMaxLength property and set it to a larger number. 不知道是否可以访问settings.js文件,但是如果可以,请查找debugMaxLength属性并将其设置为更大的数字。 It will display more of your debug info. 它将显示更多的调试信息。

This also applies for the Node-RED add-on for Home Assistant.这也适用于 Home Assistant 的 Node-RED 附加组件。 After changing the debugMaxLength value in config/node-red/settings.js, one needs to restart the add-on.更改 config/node-red/settings.js 中的 debugMaxLength 值后,需要重新启动附加组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM