{"action":"opened","issue":{"url":"https://api.github.com/repos/CzarekTomczak/cef2go/issues/22","labels_url":"https://api.github.com/repos/CzarekTomczak/cef2go/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/CzarekTomczak/cef2go/issues/22/comments","events_url":"https://api.github.com/repos/CzarekTomczak/cef2go/issues/22/events","html_url":"https://github.com/CzarekTomczak/cef2go/issues/22","id":53680821,"number":22,"title":"Add Developer Tools to mouse context menu","user":{"login":"CzarekTomczak","id":1187415,"avatar_url":"https://avatars.githubusercontent.com/u/1187415?v=3","gravatar_id":"","url":"https://api.github.com/users/CzarekTomczak","html_url":"https://github.com/CzarekTomczak","followers_url":"https://api.github.com/users/CzarekTomczak/followers","following_url":"https://api.github.com/users/CzarekTomczak/following{/other_user}","gists_url":"https://api.github.com/users/CzarekTomczak/gists{/gist_id}","starred_url":"https://api.github.com/users/CzarekTomczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CzarekTomczak/subscriptions","organizations_url":"https://api.github.com/users/CzarekTomczak/orgs","repos_url":"https://api.github.com/users/CzarekTomczak/repos","events_url":"https://api.github.com/users/CzarekTomczak/events{/privacy}","received_events_url":"https://api.github.com/users/CzarekTomczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-07T20:53:15Z","updated_at":"2015-01-07T20:53:15Z","closed_at":null,"body":"Set CefSettings.remote_debugging_port to a random value between 49152 and 65535 to enable developer tools.\r\n\r\nThe C++ code for showing devtools is:\r\n```\r\nbool ShowDevTools(CefRefPtr<CefBrowser> browser) {\r\n    CefWindowInfo windowInfo;\r\n    CefBrowserSettings settings;\r\n    #if defined(OS_WIN)\r\n    windowInfo.SetAsPopup(browser->GetHost()->GetWindowHandle(), \"DevTools\");\r\n    #endif\r\n    browser->GetHost()->ShowDevTools(windowInfo, browser->GetHost()->GetClient(), settings);\r\n    return true;\r\n}\r\n```\r\n\r\nThe C++ code for adding a menu item is:\r\n```\r\nCefContextMenuHandler::OnBeforeContextMenu() {\r\n    model->AddItem(_MENU_ID_DEVTOOLS, \"Show Developer Tools\");\r\n}\r\nCefContextMenuHandler::OnContextMenuCommand() {\r\n    if (command_id == _MENU_ID_DEVTOOLS) {\r\n        ShowDevTools(browser);\r\n        return true;\r\n    }\r\n}\r\n```"}}