debugging a CEF Browser Window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

debugging a CEF Browser Window

Postby mightee » Tue Jul 18, 2017 12:15 pm

Hi there, I am new to this forums. I am looking for help for the following situation:

I am starting new at a web agency. I am assigned to make changes to a CEF app, which the company contracted. The company does not have the source code but they know (I also checked it with winspector) that the application (windows) is based on CEF. A main exe file is calling this CEF browser window, so I cant actually start it with --remote_debugging_port=1234. I need to debug this app and inject some JS so that the UI looks different. As we dont have the source code and the contractor is not reachable in any way, I wanted to ask you guys if there is any way to inject some JS to the CEF app. debugging would also suffice. any ideas ?
mightee
Newbie
 
Posts: 6
Joined: Tue Jul 18, 2017 12:10 pm

Re: debugging a CEF Browser Window

Postby magreenblatt » Tue Jul 18, 2017 1:56 pm

Without source code, which would likely be required to rebuild the app, how do you plan to fix it once you've debugged the problem?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: debugging a CEF Browser Window

Postby mightee » Tue Jul 18, 2017 2:04 pm

well i was hoping to inject the JS every time the program is started. i am out of options right now.
mightee
Newbie
 
Posts: 6
Joined: Tue Jul 18, 2017 12:10 pm

Re: debugging a CEF Browser Window

Postby magreenblatt » Tue Jul 18, 2017 2:13 pm

mightee wrote:well i was hoping to inject the JS every time the program is started. i am out of options right now.

If the app is installed and run in the usual way then that's unlikely to be a viable solution. If you can instead run the app using a custom bootstrap script then you could start it with remote-debugging enabled and then use a separate application to connect via the DevTools protocol and control/modify the app. See https://chromedevtools.github.io/devtools-protocol/ for details on the DevTools protocol.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: debugging a CEF Browser Window

Postby mightee » Tue Jul 18, 2017 2:19 pm

hmm in order to do that, i need to somehow figure out, whit what kind of parameter the cef browser window is being started. do you know any program which looks for arguments that a program takes in ?
mightee
Newbie
 
Posts: 6
Joined: Tue Jul 18, 2017 12:10 pm

Re: debugging a CEF Browser Window

Postby magreenblatt » Tue Jul 18, 2017 2:23 pm

The expected command-line flag is "--remote-debugging-port=1234" (note the slashes). Try that.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: debugging a CEF Browser Window

Postby mightee » Tue Jul 18, 2017 2:27 pm

well there are 3 exe files.
- AppName.exe
- AppUx.exe
- AppUxRender.exe

only appname.exe file shows something. the other exe files wont do anything. i guess they need some arguments to be passed.

--remote-debugging-port=1234 didnt change anything.
mightee
Newbie
 
Posts: 6
Joined: Tue Jul 18, 2017 12:10 pm

Re: debugging a CEF Browser Window

Postby mightee » Wed Jul 19, 2017 9:24 am

anyone ?
mightee
Newbie
 
Posts: 6
Joined: Tue Jul 18, 2017 12:10 pm

Re: debugging a CEF Browser Window

Postby magreenblatt » Wed Jul 19, 2017 10:52 am

Sorry, I don't have any additional advice for you. You're effectively trying to reverse-engineer a closed source application. I suggest you instead talk with the client about either getting the source code or recreating the application.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 66 guests