Is the Node.js manager compatible with activating/deactivating debug flags from the WinCC OA Console?
If so, what is the method for accessing the debug flag(s) status within the JS code?
I tried to search for this within the documentation but could not find anything.
Thank you!
Node.js Debug Flags
Search
Re: Node.js Debug Flags
You can't use the debug flags inside your javascript code
Re: Node.js Debug Flags
Thanks - that explains why I couldn't find it in the documentation!
I think this would be a useful feature, otherwise the WinCC OA log quickly fills up with console.info() entries which are very useful when debugging, but not wanted in production.
I think this would be a useful feature, otherwise the WinCC OA log quickly fills up with console.info() entries which are very useful when debugging, but not wanted in production.
- hpuchegger
- Posts: 86
- Joined: Fri Oct 08, 2021 10:38 am
Re: Node.js Debug Flags
There is a function which writes log entries if debug flag is activated - void logDebugF(flag: number | string, ...args: unknown[]) .
It is not documented though.
This is an example on how to use it:
const note = 'Additional note.';
winccoa.logDebugF('DebugFlag', 'Debug message', note);
Also there is a function isDbgFlag():
console.info(winccoa.isDbgFlag('REDU'));
Maybe you can check if this is what you're searching for.
Br, Herbert
It is not documented though.
This is an example on how to use it:
const note = 'Additional note.';
winccoa.logDebugF('DebugFlag', 'Debug message', note);
Also there is a function isDbgFlag():
console.info(winccoa.isDbgFlag('REDU'));
Maybe you can check if this is what you're searching for.
Br, Herbert
Re: Node.js Debug Flags
Hi Herbert,
That's exactly what I'm looking for!
Unfortunately, neither of those functions work for me (I'm using 3.20 patch 3)
node (2), 2025.01.23 17:15:39.721, SYS, SEVERE, 0/javascript, TypeError: winccoa.logDebugF is not a function
node (2), 2025.01.23 17:19:13.539, SYS, SEVERE, 0/javascript, TypeError: winccoa.isDbgFlag is not a function
Maybe they are scheduled for a future release?
Jim
That's exactly what I'm looking for!
Unfortunately, neither of those functions work for me (I'm using 3.20 patch 3)
node (2), 2025.01.23 17:15:39.721, SYS, SEVERE, 0/javascript, TypeError: winccoa.logDebugF is not a function
node (2), 2025.01.23 17:19:13.539, SYS, SEVERE, 0/javascript, TypeError: winccoa.isDbgFlag is not a function
Maybe they are scheduled for a future release?
Jim
- hpuchegger
- Posts: 86
- Joined: Fri Oct 08, 2021 10:38 am
Re: Node.js Debug Flags
You were right, the feature will only be released with the next patch 3.20.4 with the new NodeJS based WebUI backend.
Please test it again after the new patch was released.
Br, Herbert
Please test it again after the new patch was released.
Br, Herbert