{"action":"created","issue":{"url":"https://api.github.com/repos/buggerjs/bugger/issues/56","labels_url":"https://api.github.com/repos/buggerjs/bugger/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/buggerjs/bugger/issues/56/comments","events_url":"https://api.github.com/repos/buggerjs/bugger/issues/56/events","html_url":"https://github.com/buggerjs/bugger/issues/56","id":118994439,"number":56,"title":"Notifications are not buffered?","user":{"login":"caspervonb","id":157787,"avatar_url":"https://avatars.githubusercontent.com/u/157787?v=3","gravatar_id":"","url":"https://api.github.com/users/caspervonb","html_url":"https://github.com/caspervonb","followers_url":"https://api.github.com/users/caspervonb/followers","following_url":"https://api.github.com/users/caspervonb/following{/other_user}","gists_url":"https://api.github.com/users/caspervonb/gists{/gist_id}","starred_url":"https://api.github.com/users/caspervonb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caspervonb/subscriptions","organizations_url":"https://api.github.com/users/caspervonb/orgs","repos_url":"https://api.github.com/users/caspervonb/repos","events_url":"https://api.github.com/users/caspervonb/events{/privacy}","received_events_url":"https://api.github.com/users/caspervonb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-26T08:15:46Z","updated_at":"2015-11-26T19:14:50Z","closed_at":null,"body":"It seems that notifications are not buffered like they are in chromium based implementations.\r\n\r\nHere's a small example, I'll leave out the code as it isn't that relevant, rather I'll dump the request/response data from `node-rdbg`.\r\n\r\n```\r\nTAP version 13\r\n# spawn\r\nstdout: 'chrome-devtools://devtools/bundled/inspector.html?ws=127.0.0.1:4000/websocket'\r\nstdout: 'console log'\r\nRDBG 38874: connect\r\nRDBG 38874: request { id: 0, method: 'Console.enable', params: {} }\r\nRDBG 38874: message { method: 'Debugger.scriptParsed',\r\n  params: \r\n   { scriptId: '236',\r\n     url: 'file:///usr/local/lib/node_modules/bugger/lib/agents/console/index.js',\r\n     lineCount: 103,\r\n     sourceOffset: { line: 0, column: 0 },\r\n     context: null,\r\n     evalContext: null } }\r\nRDBG 38874: response { id: 0, method: 'Console.enable', params: {} }, { id: 0, error: null }\r\n```\r\n\r\nSo there are two things going \"wrong\" here. Or they are at-least behaving differently from the spec.\r\n\r\n- I have not called  `Debugger.enable`, yet I am getting `scriptParsed` notifications.\r\n- I am not getting `Console.messageAdded` notifications for the console messages that occurred before `Console.enable` is called."},"comment":{"url":"https://api.github.com/repos/buggerjs/bugger/issues/comments/159978891","html_url":"https://github.com/buggerjs/bugger/issues/56#issuecomment-159978891","issue_url":"https://api.github.com/repos/buggerjs/bugger/issues/56","id":159978891,"user":{"login":"jkrems","id":567540,"avatar_url":"https://avatars.githubusercontent.com/u/567540?v=3","gravatar_id":"","url":"https://api.github.com/users/jkrems","html_url":"https://github.com/jkrems","followers_url":"https://api.github.com/users/jkrems/followers","following_url":"https://api.github.com/users/jkrems/following{/other_user}","gists_url":"https://api.github.com/users/jkrems/gists{/gist_id}","starred_url":"https://api.github.com/users/jkrems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkrems/subscriptions","organizations_url":"https://api.github.com/users/jkrems/orgs","repos_url":"https://api.github.com/users/jkrems/repos","events_url":"https://api.github.com/users/jkrems/events{/privacy}","received_events_url":"https://api.github.com/users/jkrems/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T19:14:50Z","updated_at":"2015-11-26T19:14:50Z","body":"I *think* this would need to happen on a case-by-case basis. E.g. when reloading or reconnecting, the agent instances are actually reused right now. So it would be a big(ish) change to make them actually track if the current client called `enable` already.\r\n\r\n* Keeping a complete memory of the console output until `clear` was called sounds good\r\n* It would be possible to silence `scriptParsed` until the first client connects. But I'm not sure if that's worth it since reconnecting will revert back to the current behavior. It's save to ignore `scriptParsed` before `enable` though since `enable` will trigger a send of all scripts known so far anyhow."}}