diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 02842c7e5e792c..bb60e47e9d9cc7 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -248,6 +248,9 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel, void dispatchProtocolMessage(const StringView& message) { std::string raw_message = protocol::StringUtil::StringViewToUtf8(message); + per_process::Debug(DebugCategory::INSPECTOR_SERVER, + "[inspector received] %s\n", + raw_message); std::unique_ptr value = protocol::DictionaryValue::cast(protocol::StringUtil::parseMessage( raw_message, false)); @@ -296,6 +299,13 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel, void flushProtocolNotifications() override { } void sendMessageToFrontend(const StringView& message) { + if (per_process::enabled_debug_list.enabled( + DebugCategory::INSPECTOR_SERVER)) { + std::string raw_message = protocol::StringUtil::StringViewToUtf8(message); + per_process::Debug(DebugCategory::INSPECTOR_SERVER, + "[inspector send] %s\n", + raw_message); + } delegate_->SendMessageToFrontend(message); }