{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/596","repository_url":"https://api.github.com/repos/svaarala/duktape","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/596/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/596/events","html_url":"https://github.com/svaarala/duktape/pull/596","id":134389784,"number":596,"title":"Implement AppCustom application-defined debug commands","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":56,"created_at":"2016-02-17T20:22:38Z","updated_at":"2016-02-19T01:34:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/svaarala/duktape/pulls/596","html_url":"https://github.com/svaarala/duktape/pull/596","diff_url":"https://github.com/svaarala/duktape/pull/596.diff","patch_url":"https://github.com/svaarala/duktape/pull/596.patch"},"body":"This adds application-defined message support to the debug protocol. When Duktape receives a request message beginning `REQ 0xff`, it pushes all the remaining dvalues in the message to the valstack and calls `heap->dbg_appcustom_cb`.  The callback can push it own values to the stack, and these are sent back to the client as a REP.\r\n\r\nIt is also possible for the target to send application-specific notifys to the client by calling `duk_debugger_notify()`.\r\n\r\nThis currently represents a breaking API change because it adds an additional callback argument to duk_debugger_attach().  If possible, it would be better to implement this in a way that didn't break the existing API guarantees.\r\n\r\nThis branch is just a prototype right now for the purpose of having something concrete to discuss.  It still needs documentation, and is somewhat messy.  However, initial testing indicates the functionality itself is working as designed."},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/186005819","html_url":"https://github.com/svaarala/duktape/pull/596#issuecomment-186005819","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/596","id":186005819,"user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T01:34:32Z","updated_at":"2016-02-19T01:34:32Z","body":"Race condition - yes, that guarding would be quite annoying.\r\n\r\nWould the return value be a reasonable compromise? Just minimally two values:\r\n\r\n- OK: notify sent\r\n- Not OK: notify not sent\r\n\r\n(Either modelled as a boolean or a couple of return defines, which has the option for adding more if that's foreseeable.)\r\n\r\nWhen debugging is disabled just return \"Not OK\" and debug log that there's no debugger support?\r\n"}}