I'm trying to find failures when loading an image or script via Awesomium WebView, but the console only seems to log Javascript errors. Are there ways to capture that data as well?
webView.ConsoleMessage += ( s, e ) =>
{
Console.WriteLine(string.Format( "{0}: {1}, {2} | {3}: {4}", e.EventType, e.EventName, e.Message, e.Source, e.LineNumber ));
};
ConsoleMessage
occurs when a message is added to the console on the page. This is usually the result of a JavaScript error being encountered on a page or of messages added through Console
.
Failures to load resources will fire a LoadingFrameFailed
event. The event's arguments provide an ErrorDescription
and an ErrorCode
of type NetError
.