ShowDevTools is not showing the Developer Tools

4,341 views
Skip to first unread message

Vin Kamat

unread,
Apr 8, 2013, 6:11:23 PM4/8/13
to cefs...@googlegroups.com
I am calling the webView.ShowDevTools(); however I get this error shown in the Window that opens up.

Error -2 when loading url chrome-devtools://devtools/devtools.html?docked=false&toolbarColor=rgba(223,223,223,1)&textColor=rgba(18,50,114,1)

The same thing happens in the CefSharp.Winforms.Example as well.

Any help is appreciated.
-Vin

anthony taranto

unread,
Apr 8, 2013, 6:17:45 PM4/8/13
to cefs...@googlegroups.com
You must place the file "devtools_resources.pak" in the same directory as your executable.

--Anthony


-Vin

--
You received this message because you are subscribed to the Google Groups "CefSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Vin Kamat

unread,
Apr 8, 2013, 6:22:20 PM4/8/13
to cefs...@googlegroups.com
Thank you. That worked beautifully.

From what I've seen so far CefSharp is fast and fantastic. 
Particularly the number of files I've to deploy is so less compared to OpenWebKitSharp for example.

Great job bringing this to the .Net world.

Thanks again for the quick response.
-Vin

anthony taranto

unread,
Apr 8, 2013, 6:25:20 PM4/8/13
to cefs...@googlegroups.com
Thanks, glad you like it. open-webkit-sharp is a great project too but is somewhat divergent from the chromium model. Also, I can't take credit for bringing CefSharp into the world, I just adopted it.

--Anthony

omri

unread,
Sep 4, 2013, 4:36:36 AM9/4/13
to cefs...@googlegroups.com
I have the same problem but the "devtools_resources.pak" is in the same directory as my executable.
Any ideas?

Thanks

Per Lundberg

unread,
Sep 4, 2013, 4:18:25 PM9/4/13
to cefs...@googlegroups.com
Hi,

Do you have locales\en-US.pak (as noted in the FAQ, https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions) also in the same folder?

Best regards,
Per

omri

unread,
Sep 8, 2013, 5:14:55 AM9/8/13
to cefs...@googlegroups.com
Hi,
Yes the locales files are also there... when i using the test application it works but when i'm using my app i got:
Error -2 when loading url chrome-devtools://devtools/devtools.html?docked=false&toolbarColor=rgba(223,223,223,1)&textColor=rgba(18,50,114,1)

Thanks

Per Lundberg

unread,
Sep 8, 2013, 6:00:54 AM9/8/13
to cefs...@googlegroups.com
Hi,

OK. Please post your sample project on the web and we can give it a look.

Best regards,
Per
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/Rnt0mtPC944/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
mvh,
Per Lundberg

omri

unread,
Sep 12, 2013, 3:07:07 AM9/12/13
to cefs...@googlegroups.com
Well, this is the problem. in a demo app that i wrote it works but on my real project (that is huge so i cant post it here) it just don't work... i'll try to test it around more... thanks...
To unsubscribe from this group and all its topics, send an email to cefsharp+unsubscribe@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/groups/opt_out.


--
mvh,
Per Lundberg

Per Lundberg

unread,
Sep 12, 2013, 5:00:20 PM9/12/13
to cefs...@googlegroups.com
Hi,

It's quite likely that it has to do with some file missing, or perhaps the fact that the real project changes the current working directory? In that case, CEF would be unable to locate the files. I think you can override the location of the folder though (using the Settings class); that should work regardless of the working directory.

Best regards,
Per 

Josef Seibl

unread,
Sep 24, 2013, 1:14:09 PM9/24/13
to cefs...@googlegroups.com
Hello,

I just found it out after a few hours of debugging and solved it (hopefully this works for you too): The documentation is very unclear and misleading!

IF you want to include developer tools, you have to include the locales folder and the devtools_resources.pak in the .exe folder. But THEN you must not disable PackLoading. I.e. DON'T include;

 var settings = new CefSharp.Settings
{
    PackLoadingDisabled = true,
};
if(CEF.Initialize(settings) )...
 
Or else you get an error:
Error -2 when loading url chrome-devtools://devtools/devtools.html?docked=false&toolbarColor=rgba(223,223,223,1)&textColor=rgba(18,50,114,1)


On the other hand, if you don't include these files, you have to init CefSharp once with
PackLoadingDisabled = true

Or else the program will crash upon startup with an error in
libcef.dll

My recommendation for using the developer tools during development: Add a post-build event in visual studio.
if $(ConfigurationName) == Debug ( xcopy /Y /E "$(ProjectDir)DebugBundled" "$(ProjectDir)$(OutDir)")

And have your locale and devtools-pak in a folder called DebugBundled in you project directory.


Best
Josef

Per Lundberg

unread,
Sep 24, 2013, 3:17:38 PM9/24/13
to cefs...@googlegroups.com
Hi,

Yes, this is correct, but it's also what the wiki page says (or tries to say).

Feel free to suggest improvements, or edit it directly.

Sent from my iPhone
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.

Josef Seibl

unread,
Sep 24, 2013, 4:05:06 PM9/24/13
to cefs...@googlegroups.com
Hi,

Yes, this is correct, but it's also what the wiki page says (or tries to say).

Yes, now I know... ;)
 

Feel free to suggest improvements, or edit it directly.

Thank you, I will send a suggestion. 


Best
J.
Reply all
Reply to author
Forward
0 new messages