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
console.log() shows nothing in log viewer
Search
Re: console.log() shows nothing in log viewer
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
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
the Log Viewer of project, it doesn't print messages written inside JavaScript code using console.log().
Best Regards
Anes
Best Regards
Anes
Re: console.log() shows nothing in log viewer
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
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
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
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
-
philipp.wechsler
- Posts: 13
- Joined: Tue May 17, 2016 2:27 pm
Re: console.log() shows nothing in log viewer
At WebView Ewo you can activate the developer settings with:
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.
Code: Select all
this.setAttribute ("DeveloperExtrasEnabled", TRUE);It opens the "Web Inspector" that have a console like Google Chrome.