Search code examples
c#winformsdotnetbrowser

Browser.GetRemoteDebuggingURL() of DotNetBrowser returns string.Empty


I set up an Winform-Application (in future it will be WPF) with the DotNetBrowserControl

BrowserView browserView = new 
    WinFormsBrowserView(BrowserFactory.Create(BrowserType.HEAVYWEIGHT));
Controls.Add((Control)m_BrowserView);
string remoteDebuggingUrl = m_BrowserView.Browser.GetRemoteDebuggingURL();

notice that remoteDebuggingUrl is string.Empty

DotNetBrowserVersion/DotNetBrowserChromium - Version:1.8.3.0 .NetFramework: 4.5.2


Solution

  • thanks stuartd,

    this is exactly what needs to be done.

    But in fact I gathered out my fault.

    BrowserPreferences.SetChromiumSwitches("--remote-debugging-port=9222")

    see http://dotnetbrowser-support.teamdev.com/documentation/chromium-switches

    here you see, that SetChromiumSwitches takes whether a string, or a string params array

    my switch string has been like this "--switchOne --switchTwo", so it's only a string and not an array.

    The problem in general is, that it worked like this in earlier days. As I now switched to a string[] it works fine