void NodeJSDebugger::DeleteBreakpoint(const NodeJSBreakpoint& bp)
{
    // Sanity
    if(!IsConnected()) return;
    if(!bp.IsApplied()) return;

    // Build the request
    JSONElement request = JSONElement::createObject();
    request.addProperty("type", "request");
    request.addProperty("command", "clearbreakpoint");
    JSONElement args = JSONElement::createObject("arguments");
    request.append(args);
    args.addProperty("breakpoint", bp.GetNodeBpID());

    // Write the command
    m_socket->WriteRequest(request, new NodeJSSetBreakpointHandler(bp));
}
void NodeJSDevToolsProtocol::DeleteBreakpoint(clWebSocketClient& socket, const NodeJSBreakpoint& bp)
{
    try {
        JSONItem params = JSONItem::createObject("params");
        params.addProperty("breakpointId", bp.GetNodeBpID());
        // Send the command
        SendSimpleCommand(socket, "Debugger.removeBreakpoint", params);

        // Register a handler to handle this command when it returns
        CommandHandler handler(message_id, [=](const JSONItem& result) {
            clDebugEvent bpEvent(wxEVT_NODEJS_DEBUGGER_UPDATE_BREAKPOINTS_VIEW);
            EventNotifier::Get()->AddPendingEvent(bpEvent);
        });
        m_waitingReplyCommands.insert({ handler.m_commandID, handler });
    } catch(clSocketException& e) {
        clWARNING() << e.what();
    }
}