我正在使用dcef3在我的Delphi應用程序中嵌入瀏覽器。我想啓用遠程調試,以檢查在嵌入式瀏覽器中運行的JavaScript代碼。如何使用dcef3啓用遠程調試
我試圖啓用遠程調試端口時,將顯示含有TChromium控制父窗體,但我不知道怎麼做才能進行實際訪問調試器:
procedure TMapViewSingleSector.FormShow(Sender: TObject);
begin
CefRemoteDebuggingPort := 9000;
ChromeView.Load('http://localhost:8080/');
end;
然而,當,我嘗試從另一個chrome瀏覽器訪問localhost:9000,頁面無法加載。
編輯:我將CefRemoteDebuggingPort
初始化移動到窗體初始化部分(在窗體顯示之前)。現在,當我將google chrome指向端口9000時,我可以看到webcomponents。不過,我有另一個錯誤:
inspector.js:10392 Uncaught TypeError: Object.observe is not a function
at WebInspector.Main._createSettings (inspector.js:10392)
at WebInspector.Main._gotPreferences (inspector.js:10384)
at WebInspector.InspectorFrontendHostStub.getPreferences (inspector.js:1352)
at WebInspector.Main._loaded (inspector.js:10383)
at windowLoaded (inspector.js:677)
注意:我的瀏覽器的版本不同於DCEF3。
你有沒有在目錄cef.pak和devtools_resources.pak,你必須二進制這樣的事情文件?我已經很容易地使用調試器 – RBA
@RBA yes cef.pak和devtools_resources.pak都位於二進制目錄中。請注意,我可以在表單中成功打開調試工具(我想要做的是啓用遠程調試)。是否有特定的程序來啓用遠程調試? – BigONotation
看看 - https://stackoverflow.com/questions/29117882/debugging-javascript-in-chromium-embedded-framework – RBA