Skip to content
David Desmaisons edited this page Sep 29, 2016 · 7 revisions

1. Interactive Debug

To activate Debug mode for HTLMLWindow or HTMLViewControl set IsDebug as true

In debug mode, 3 buttons will be displayed:

debug buttons

Inspect will open chromium javascript debug windows

inspect

Inspect VM will a javascript framework specific window to display information about the binding:

InspectVM

About will open a windows displaying information about Neutronium configuration:

About

2. Trace

By default, Neutronium will use the trace listener to log events. Neutronium will log binding errors as well as console.log message from the HTML session.

If you need to use a different logger to output the Neutronium events you can implement your own IWebSessionLogger:

    public interface IWebSessionLogger
    {
        /// <summary>
        /// called for debug logging
        /// </summary>
        void Debug(Func<string> information);

        /// <summary>
        /// called for debug logging
        /// </summary>
        void Debug(string information);

        /// <summary>
        /// called for information logging
        /// </summary>
        void Info(string information);

        /// <summary>
        /// called for information logging 
        /// </summary>
        void Info(Func<string> information);

        /// <summary>
        /// called on critical event 
        /// </summary>
        void Error(string information);

        /// <summary>
        /// called on critical event 
        /// </summary>
        void Error(Func<string> information);

        /// <summary>
        /// called on each consolo log called by browser 
        /// </summary>
        void LogBrowser(ConsoleMessageArgs iInformation, Uri url);

        /// <summary>
        /// called in case of browser critical error
        /// </summary>
        void WebBrowserError(Exception exception, Action cancel);
    }

And then setting Neutronium Engine session logger:

var myLogger = new MyLogger();
HTMLEngineFactory.Engine.WebSessionLogger = myLogger;