BlinkGTK DevTools API Reference

Version: 1.2.0-build2
Last updated: 2026-07-29
Language: English |

日本語


About this page

APIs for debugging the displayed page with Chrome DevTools — DOM
inspection, the console, network, and performance profiling, exactly as in
Chrome.

Usage

/* Open remote debugging (port 0 = automatic) */
gint port = blink_web_view_open_devtools(view, 0);
if (port > 0) {
    char *url = blink_web_view_get_devtools_url(view);
    g_print("DevTools: %s\n", url ? url : "(no URL)");
    g_free(url);
}

Open the printed URL in Chrome / Chromium, or connect via chrome://inspect.

Overview

What you want API
Open DevTools blink_web_view_open_devtools()
Close DevTools blink_web_view_close_devtools()
Get the frontend URL blink_web_view_get_devtools_url()
Set the DevTools UI language blink_gtk_set_devtools_locale()
Get the DevTools UI language blink_gtk_get_devtools_locale()

API

Opens remote debugging on the given port.

Signature:

gint blink_web_view_open_devtools(BlinkWebView* web_view, gint port);

Pass 0 to pick a free port automatically. Returns the port actually in use,
or 0 on failure.

Closes the remote debugging connection.

Signature:

void blink_web_view_close_devtools(BlinkWebView* web_view);

Returns the DevTools frontend URL. Free it with g_free(). Returns NULL
when not connected.

Signature:

char* blink_web_view_get_devtools_url(BlinkWebView* web_view);

Sets / gets the DevTools UI language. Setting "ja" gives you DevTools in
Japanese. Call before blink_gtk_init().

Signature:

void blink_gtk_set_devtools_locale(const char* locale);
const char* blink_gtk_get_devtools_locale(void);

Notes

Change history

Version Change
v1.1.0 First version of this page (the APIs themselves ship since v1.0)