diff --git a/AK/Debug.h.in b/AK/Debug.h.in index a554a917eb..4d0a3c5d68 100644 --- a/AK/Debug.h.in +++ b/AK/Debug.h.in @@ -530,6 +530,10 @@ # cmakedefine01 WEBDRIVER_DEBUG #endif +#ifndef WEBDRIVER_ROUTE_DEBUG +# cmakedefine01 WEBDRIVER_ROUTE_DEBUG +#endif + #ifndef WEBGL_CONTEXT_DEBUG # cmakedefine01 WEBGL_CONTEXT_DEBUG #endif diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake index 4d064bca47..4964079df3 100644 --- a/Meta/CMake/all_the_debug_macros.cmake +++ b/Meta/CMake/all_the_debug_macros.cmake @@ -212,6 +212,7 @@ set(WASM_BINPARSER_DEBUG ON) set(WASM_TRACE_DEBUG ON) set(WASM_VALIDATOR_DEBUG ON) set(WEBDRIVER_DEBUG ON) +set(WEBDRIVER_ROUTE_DEBUG ON) set(WEBGL_CONTEXT_DEBUG ON) set(WEBSERVER_DEBUG ON) set(WEB_FETCH_DEBUG ON) diff --git a/Meta/gn/secondary/AK/BUILD.gn b/Meta/gn/secondary/AK/BUILD.gn index 473b5a62c8..7b498930be 100644 --- a/Meta/gn/secondary/AK/BUILD.gn +++ b/Meta/gn/secondary/AK/BUILD.gn @@ -363,6 +363,7 @@ write_cmake_config("ak_debug_gen") { "WASM_TRACE_DEBUG=", "WASM_VALIDATOR_DEBUG=", "WEBDRIVER_DEBUG=", + "WEBDRIVER_ROUTE_DEBUG=", "WEBGL_CONTEXT_DEBUG=", "WEBP_DEBUG=", "WEBSERVER_DEBUG=", diff --git a/Userland/Libraries/LibWeb/WebDriver/Client.cpp b/Userland/Libraries/LibWeb/WebDriver/Client.cpp index 1ab25c85ba..ca5ab4feff 100644 --- a/Userland/Libraries/LibWeb/WebDriver/Client.cpp +++ b/Userland/Libraries/LibWeb/WebDriver/Client.cpp @@ -109,7 +109,7 @@ static constexpr auto s_webdriver_endpoints = Array { // https://w3c.github.io/webdriver/#dfn-match-a-request static ErrorOr match_route(HTTP::HttpRequest const& request) { - dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_string_view(request.method()), request.resource()); + dbgln_if(WEBDRIVER_ROUTE_DEBUG, "match_route({}, {})", HTTP::to_string_view(request.method()), request.resource()); auto request_path = request.resource().view(); Vector parameters; @@ -128,7 +128,7 @@ static ErrorOr match_route(HTTP::HttpRequest const& request }; for (auto const& route : s_webdriver_endpoints) { - dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_string_view(route.method), route.path); + dbgln_if(WEBDRIVER_ROUTE_DEBUG, "- Checking {} {}", HTTP::to_string_view(route.method), route.path); if (route.method != request.method()) continue; @@ -156,7 +156,7 @@ static ErrorOr match_route(HTTP::HttpRequest const& request } if (*match) { - dbgln_if(WEBDRIVER_DEBUG, "- Found match with parameters={}", parameters); + dbgln_if(WEBDRIVER_ROUTE_DEBUG, "- Found match with parameters={}", parameters); return MatchedRoute { route.handler, move(parameters) }; } }