{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/4829","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/4829/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/4829/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/4829/events","html_url":"https://github.com/Microsoft/vscode/issues/4829","id":144910969,"number":4829,"title":"[DebugAdapter] Return Object instead of plain string in evaluateRequest","user":{"login":"rebornix","id":876920,"avatar_url":"https://avatars.githubusercontent.com/u/876920?v=3","gravatar_id":"","url":"https://api.github.com/users/rebornix","html_url":"https://github.com/rebornix","followers_url":"https://api.github.com/users/rebornix/followers","following_url":"https://api.github.com/users/rebornix/following{/other_user}","gists_url":"https://api.github.com/users/rebornix/gists{/gist_id}","starred_url":"https://api.github.com/users/rebornix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebornix/subscriptions","organizations_url":"https://api.github.com/users/rebornix/orgs","repos_url":"https://api.github.com/users/rebornix/repos","events_url":"https://api.github.com/users/rebornix/events{/privacy}","received_events_url":"https://api.github.com/users/rebornix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode/labels/debug","name":"debug","color":"c7def8"}],"state":"closed","locked":false,"assignee":{"login":"isidorn","id":1926584,"avatar_url":"https://avatars.githubusercontent.com/u/1926584?v=3","gravatar_id":"","url":"https://api.github.com/users/isidorn","html_url":"https://github.com/isidorn","followers_url":"https://api.github.com/users/isidorn/followers","following_url":"https://api.github.com/users/isidorn/following{/other_user}","gists_url":"https://api.github.com/users/isidorn/gists{/gist_id}","starred_url":"https://api.github.com/users/isidorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isidorn/subscriptions","organizations_url":"https://api.github.com/users/isidorn/orgs","repos_url":"https://api.github.com/users/isidorn/repos","events_url":"https://api.github.com/users/isidorn/events{/privacy}","received_events_url":"https://api.github.com/users/isidorn/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-31T14:01:44Z","updated_at":"2016-03-31T17:49:13Z","closed_at":"2016-03-31T17:49:13Z","body":"- VSCode Version: 0.10.11\r\n- OS Version: Mac OS\r\n\r\nWhen we implement our own debug adapter, we need to override `evaluateRequest` functionality. For now the return result is simply a string per definition\r\n\r\n```\r\n/** Response to \"evaluate\" request. */\r\n    interface EvaluateResponse extends Response {\r\n        body: {\r\n            /** The result of the evaluate. */\r\n            result: string;\r\n            /** If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest */\r\n            variablesReference: number;\r\n        };\r\n    }\r\n```\r\n\r\nHowever if we inspect objects when we debug TypeScript project, we can get a TRUE object \r\n\r\n![image](https://cloud.githubusercontent.com/assets/876920/14177672/fd2bf870-f789-11e5-8a12-973eb761eade.png)\r\n\r\nMaybe I miss something, is this possible for custom debug adapters?\r\n\r\nMoreover, as it's plain string and it can't produce multiline output as OutputEvent does, we fail to do the right evaluation for ruby `inspect` override (see https://github.com/rebornix/vscode-ruby/issues/14). Let's say we have such a Class called Person and its `inspect` is override as `\"hello \\n #{@name}\"`, you will get following results in `irb`\r\n\r\n```\r\n> person = Person.new(\"Peng\")\r\n => hello\r\n Peng\r\n> person\r\n => hello\r\n Peng\r\n> person.inspect\r\n => \"hello \\n Peng\"\r\n```\r\n\r\nIn current `EvaluateResponse`, the result is always `\"hello \\n Peng\"`. I don't see any workaround for this.\r\n"}}