"use strict";

var mlink = require("../index");
var Router = mlink.Router;
var debuggerRouter = Router.get("debugger");
debuggerRouter.registerHandler(function (message) {
  if (message.payload.method === "Debugger.scriptParsed" || message.payload.result && message.payload.result.frameTree || message.payload.params && /\/syncCallNative/.test(message.payload.params.message)) {
    message.discard();
  }
  message.to("proxy.inspector");
}).at("runtime.proxy");