If you are interested in HTTP communication, try this:
-'MIDORI_DEBUG=soup:2 _build/default/midori/midori'
+'MIDORI_DEBUG=headers _build/default/midori/midori'
-Where '2' can be a level between 1 and 3.
+Where 'headers' can be replaced with 'body' to get full message contents.
If you are interested in (non-) touchscreen behaviour, try this:
If you want to "dry run" without WebKitGTK+ rendering, try this:
-'MIDORI_UNARMED=1 _build/default/midori/midori'
+'MIDORI_DEBUG=unarmed _build/default/midori/midori'
If you want to test bookmarks, you can enable database tracing:
(__filter[4] != '-' && __filter[5] != '-')
#ifdef G_ENABLE_DEBUG
#define adblock_debug(dmsg, darg1, darg2) \
- do { if (midori_debug ("adblock:1")) g_debug (dmsg, darg1, darg2); } while (0)
+ do { if (midori_debug ("adblock:match")) g_debug (dmsg, darg1, darg2); } while (0)
#else
#define adblock_debug(dmsg, darg1, darg2) /* nothing */
#endif
}
#ifdef G_ENABLE_DEBUG
- if (midori_debug ("adblock:2"))
+ if (midori_debug ("adblock:time"))
g_test_timer_start ();
#endif
if (adblock_is_matched (req_uri, page_uri))
g_object_set_data (G_OBJECT (web_view), "blocked-uris", blocked_uris);
}
#ifdef G_ENABLE_DEBUG
- if (midori_debug ("adblock:2"))
+ if (midori_debug ("adblock:time"))
g_debug ("match: %f%s", g_test_timer_elapsed (), "seconds");
#endif
MidoriWebSettings* settings)
{
const gchar* accept = midori_web_settings_get_accept_language (settings);
- if (midori_debug ("soup"))
- g_message ("Accept-Language set to '%s'", accept);
soup_message_headers_append (msg->request_headers, "Accept-Language", accept);
if (katze_object_get_boolean (settings, "strip-referer"))
soup_uri_free (stripped_uri);
if (strcmp (stripped_referer, referer))
{
- if (midori_debug ("soup"))
+ if (midori_debug ("referer"))
g_message ("Referer '%s' stripped to '%s'", referer, stripped_referer);
soup_message_headers_replace (msg->request_headers, "Referer",
stripped_referer);
midori_soup_session_debug (SoupSession* session)
{
gint soup_debug_level = 0;
- if (midori_debug ("soup:1"))
- soup_debug_level = 1;
- else if (midori_debug ("soup:2"))
- soup_debug_level = 2;
- else if (midori_debug ("soup:3"))
- soup_debug_level = 3;
+ if (midori_debug ("headers"))
+ soup_debug_level = SOUP_LOGGER_LOG_HEADERS;
+ else if (midori_debug ("body"))
+ soup_debug_level = SOUP_LOGGER_LOG_BODY;
if (soup_debug_level > 0)
{
SoupLogger* logger = soup_logger_new (soup_debug_level, -1);
{
static const gchar* debug_token = NULL;
const gchar* debug = g_getenv ("MIDORI_DEBUG");
- const gchar* debug_tokens = "soup soup:1 soup:2 soup:3 cookies paths hsts ";
- const gchar* full_debug_tokens = "adblock:1 adblock:2 startup bookmarks ";
+ const gchar* debug_tokens = "headers body referer cookies paths hsts unarmed ";
+ const gchar* full_debug_tokens = "adblock:match adblock:time startup bookmarks ";
if (debug_token == NULL)
{
gchar* found_token;
g_warning ("Calling %s() before adding the view to a browser. This "
"breaks extensions that monitor page loading.", G_STRFUNC);
- if (g_getenv ("MIDORI_UNARMED") == NULL)
+ if (!midori_debug ("unarmed"))
{
if (!uri || !strcmp (uri, "") || !strcmp (uri, "about:blank"))
{
#include "midori-websettings.h"
+#include "midori-app.h"
#include "sokoke.h"
#include <midori/midori-core.h> /* Vala API */
#if !WEBKIT_CHECK_VERSION (1, 8, 2) && defined G_OS_WIN32
return FALSE;
#else
- return g_getenv ("MIDORI_UNARMED") == NULL
- && g_strcmp0 (g_getenv ("MOZ_PLUGIN_PATH"), "/");
+ return !midori_debug ("unarmed") && g_strcmp0 (g_getenv ("MOZ_PLUGIN_PATH"), "/");
#endif
}