Jump to content

toggleBrowserDevTools with "tab" argument


Recommended Posts

I have already migrated to CEF DevTools console (redirected every debug message to DevTools console), and I want to say that it is amazingly convenient now to debug tables and to view call trace.

For example:

6e0c3e5f8974168fe2c4.jpg

I call toggleBrowserDevTools in onClientResourceStart to run debug console right when client starts (and also binded f5 to "refreshall" so scenario is "make changes in code" => "press f5" => "debug console opened with client and I see the result immediately" => "make changes in code" => "press f5"...) so I dont waste my time to open debug console each time I make some changes in code and want to reload resource.

Seems like toggleBrowserDevTools has two arguments (browser and boolean), and always opens DevTools on first "Elements" tab (HTML DOM structure), so I have to change the tab to "Console" each time it is opened.

I will be very grateful if you add the third argument (tab to open) or make it possible to save current active DevTools tab so it'll not be set to "Elements" each time client starts. Something like Ctrl+Shift+C in regular browser (works in Chrome so I guess it is possible to make such a thing)

By the way, toggleBrowserDevTools wiki page (https://wiki.multitheftauto.com/wiki/To ... erDevTools) says "Server error 404"

Thanks for your attention, you guys are the best community I've met so far.

And excuese me for my English (but it would be great if you point me on my mistakes)

Link to comment

CEF doesn't provide a direct method to switch between tabs.

As an alternative, I could execute a Javascript hack in the devtools browser instance, but that might break when Chromium gets updated.

==> It's generally better to avoid such hacks and since you can also debug web stuff in your local Chromium installation, it's imho not worth creating such a dependency, sorry.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...