{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/2","repository_url":"https://api.github.com/repos/dart-lang/vm_service_client","labels_url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/2/comments","events_url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/2/events","html_url":"https://github.com/dart-lang/vm_service_client/issues/2","id":131704425,"number":2,"title":"Allow talking to custom VM service extensions","user":{"login":"yjbanov","id":211513,"avatar_url":"https://avatars.githubusercontent.com/u/211513?v=3","gravatar_id":"","url":"https://api.github.com/users/yjbanov","html_url":"https://github.com/yjbanov","followers_url":"https://api.github.com/users/yjbanov/followers","following_url":"https://api.github.com/users/yjbanov/following{/other_user}","gists_url":"https://api.github.com/users/yjbanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yjbanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjbanov/subscriptions","organizations_url":"https://api.github.com/users/yjbanov/orgs","repos_url":"https://api.github.com/users/yjbanov/repos","events_url":"https://api.github.com/users/yjbanov/events{/privacy}","received_events_url":"https://api.github.com/users/yjbanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-05T17:34:34Z","updated_at":"2016-02-05T19:13:33Z","closed_at":null,"body":"`dart:developer` supports [registering custom extensions](https://api.dartlang.org/1.14.1/dart-developer/registerExtension.html). `vm_service_client` should support communicating with those. Since the parameter and the response schemas (other than the isolate ID) are not known, the API has to be generic. One way to do it is to simply add a `sendRequest` method to `VMIsolateRef` that forwards to `_scope.sendRequest`:\r\n\r\n```dart\r\nclass VMIsolateRef {\r\n\r\n  ...\r\n\r\n  /// Makes a raw RPC to the VM isolate corresponding to the ID [number].\r\n  ///\r\n  /// [method] must correspond either to a built-in VM service method or to a\r\n  /// custom VM service extension installed on the VM isolate.\r\n  ///\r\n  /// [params] are passed to the extension handler and must be serializable to\r\n  /// a JSON string.\r\n  Future<Map> sendRequest(String method, [Map<String, Object> params]) async {\r\n    return _scope.sendRequest(method, params);\r\n  }\r\n\r\n  ...\r\n\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/comments/180506617","html_url":"https://github.com/dart-lang/vm_service_client/issues/2#issuecomment-180506617","issue_url":"https://api.github.com/repos/dart-lang/vm_service_client/issues/2","id":180506617,"user":{"login":"yjbanov","id":211513,"avatar_url":"https://avatars.githubusercontent.com/u/211513?v=3","gravatar_id":"","url":"https://api.github.com/users/yjbanov","html_url":"https://github.com/yjbanov","followers_url":"https://api.github.com/users/yjbanov/followers","following_url":"https://api.github.com/users/yjbanov/following{/other_user}","gists_url":"https://api.github.com/users/yjbanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yjbanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjbanov/subscriptions","organizations_url":"https://api.github.com/users/yjbanov/orgs","repos_url":"https://api.github.com/users/yjbanov/repos","events_url":"https://api.github.com/users/yjbanov/events{/privacy}","received_events_url":"https://api.github.com/users/yjbanov/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T19:13:33Z","updated_at":"2016-02-05T19:13:33Z","body":"https://codereview.chromium.org/1670283002/"}}