Page 1 of 1
console.log() shows nothing in log viewer
Posted: Tue May 14, 2019 3:31 pm
by anes47
Hello,
I've a script and I use loadSnippet to load it (I use OaJsApi), the problem is I don't know how to debug in WebViewer EWO, in Chrome I can call the console but how I can call it in Wincc OA (I can't debug with chrome because I use OaJsApi so I must call it from CTRL with this.loadSnippet("url")).
I tried also to print messages from JS in log Viewer using console.log(), but nothing happens in log viewer.
Any ideas ?
Best Regards
Anes
Re: console.log() shows nothing in log viewer
Posted: Tue May 14, 2019 5:28 pm
by leoknipp
I'm not sure which log viewer you are talking about.
The WinCC OA log viewer shows information for *.log files which are written in the log directory of the WinCC OA project.
Best Regards
Leopold Knipp
Senior Support Specialist
Re: console.log() shows nothing in log viewer
Posted: Wed May 15, 2019 6:34 pm
by anes47
the Log Viewer of project, it doesn't print messages written inside JavaScript code using console.log().
Best Regards
Anes
Re: console.log() shows nothing in log viewer
Posted: Wed May 15, 2019 7:21 pm
by leoknipp
If there is no ".log" file existing which has the JavaScript information the log viewer cannot show the information.
When information shall be displayed in the log viewer you have to write the information to a ".log" file in the log directory for the WinCC OA project.
Best Regards
Leopold Knipp
Senior Support Specialist
Re: console.log() shows nothing in log viewer
Posted: Thu May 16, 2019 10:45 am
by anes47
Okay, Thank you.
can you show me please what should I add inside .log file to have a console "like chrome's console", where I can see errors, messages .. etc
Thank you so much
Anes
Re: console.log() shows nothing in log viewer
Posted: Mon May 04, 2020 11:56 am
by philipp.wechsler
At WebView Ewo you can activate the developer settings with:
Code: Select all
this.setAttribute ("DeveloperExtrasEnabled", TRUE);
Then, you have a new context menu entry "Inspect" on the running WebView Ewo.
It opens the "Web Inspector" that have a console like Google Chrome.