Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<protocol::DictionaryValue> value =
protocol::DictionaryValue::cast(protocol::StringUtil::parseMessage(
raw_message, false));
Expand Down Expand Up @@ -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);
}

Expand Down