We are working on a project where we use the WebUI plugin for developing the user interface with React. We are currently facing some problems and it would be nice to be able to debug our app. It’s running perfectly in Chromium but when loaded in Unreal with WebUI its not working as intended.
As far as I understand, WebUI is using the internal Chromium Embedded Framework in UE4, which should have a debugger tool that can be opened on localhost:port.
If so, how do we know which port it’s using? Is it possible to define that port?
Please Bump.
There is still not a working solution for this Problem.
On Windows on the CEFBrowser Implementation, I could track down the CTRL+SHIFT+I
To a private method call “FCEFBrowserHandler::ShowDevTools” here however it just calls OnBeforePopup and passes a URL and Frame String which resolve to:
There is no documentation about what to do with this neither on Unreal side nor on CEF side.
From what I understand CEF enables remote debugging with the flag “remote-debugging” and then you can use the provided URL “chrome-devtools://devtools/devtools.html” with query parameters such as “remotehost=localhost:xxxx”. When I check the CEFSubprocess in Unreal none of the listed processes listen to any port, so this is also not possible. Why does the method return an incomplete URL?
I hit my head against a wall for 8 Hours straight, and I ran out of options.
Is there some really trivial option somewhere that I am missing?
What is the Intended behavior when pressing CTRl+SHIFT+I ?
What I expect:
Either a new window popping up like the one when I right click > show source
A debug URL that links to the devtools session that can be opened in a new browser (WebBrowserWidget or something else).
None of these expected behaviors work.
I Attached an image: on the left side the not working page opened as a session in one browser widget, on the right my window rendering the popup handled by OnPopup.
It’s not documented (of course not, classic Epic move) but there’s an unreal editor command line argument cefdebug=<port_number> which corresponds to the the CEF command line option remote-debugging-port.
If you are using a engine built from source, you can use the solution I came up with.
But if you are using a release version, here are the steps you can debug your web:
Add -cefdebug=port to commad line before you start your project. Note: If your unreal engine version is 4.27.2, the default port is 8088. And in version 5.3.1, there is no default port, so you must add commad line when you want to debug web.