Debugging Node-RED ui_base.js and Understanding WebSocket Behavior

Nandhini-Subramaniya
Fri, 20 Sep 2024 05:34:40 +0000
Dashboard

I'm working on debugging the ui_base.js file from the FlowFuse Node-RED Dashboard located at /home/nandhini/CTCDSERV/nodered/node-red/node_modules/@flowfuse/node-red-dashboard/nodes/config/ui_base.js.

Challenges:

1. Method 1: I'm trying to debug the file using Node.js within Node-RED. The init function is being called, but the functions inside are not executing. I’ve set breakpoints, but they are not being hit. I’m unsure how to properly debug this within Node-RED.

2. Method 2: I attempted to use CLI debugging with node --inspect ui_base.js, but I’m still facing difficulties.

Additionally, I want to understand how the WebSocket communication is working in Node-RED, specifically for the dashboard. I’m not sure where the WebSocket initialization starts and how it interacts with ui_base.js. Could anyone guide me on how to trace the WebSocket functionality?

8 posts - 4 participants