I have defined an array variable in the data() function in my vue file in 'export default()' and assigned a value in the processMsg function. I would now like to assign this to the msg variable in the js file so that I can view the values with a debug node.
In the debug node, however, I only get an undefiened value.
Is this possible to debug a value, which is assigned in the vue file?
Do you mean you want to send a message back to the server with the value in, or do you mean you want to log it directly from the browser? If you want to log it directly then you can use console.log() to show stuff in the browser developer console.
I send the message in the js-file in the on-input event. So I want to take the array from the vue-file and assign the array to the message, which is sent in the js-file.
If there is any other way to log the whole array it would be perfect.
How do I use console.log in the right way? It doesn't log anything in my code
The log should appear in the debug window in the node-red flow editor, right?
It depends where you are writing the console log. If you do in the Vue file, it will appear in the dashboards browsers developer tools console. If you do it in the nodes HTML file, it will appear in node-red browser developer tools console. If you do it in the nodes js file, it will appear in STDOUT of the node process. Typically a node does not make entries in the node-red debug sidebar. That is done by the user when they connect the output of your node to a debug node. For commissioning and debugging purposes, a node creator might add a 2nd output to the node that outputs status/debug messages.
Question. Can I make sure I understand - since you have raised this question in Developing Nodes that you are actually developing a new UI node package, not just "using node-red"?