{"action":"created","issue":{"url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/396","repository_url":"https://api.github.com/repos/MicrosoftDocs/live-share","labels_url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/396/comments","events_url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/396/events","html_url":"https://github.com/MicrosoftDocs/live-share/issues/396","id":323437607,"number":396,"title":"Error with salesforce.salesforcedx-vscode-replay-debugger debugger extension","user":{"login":"vazexqi","id":54414,"avatar_url":"https://avatars1.githubusercontent.com/u/54414?v=4","gravatar_id":"","url":"https://api.github.com/users/vazexqi","html_url":"https://github.com/vazexqi","followers_url":"https://api.github.com/users/vazexqi/followers","following_url":"https://api.github.com/users/vazexqi/following{/other_user}","gists_url":"https://api.github.com/users/vazexqi/gists{/gist_id}","starred_url":"https://api.github.com/users/vazexqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vazexqi/subscriptions","organizations_url":"https://api.github.com/users/vazexqi/orgs","repos_url":"https://api.github.com/users/vazexqi/repos","events_url":"https://api.github.com/users/vazexqi/events{/privacy}","received_events_url":"https://api.github.com/users/vazexqi/received_events","type":"User","site_admin":false},"labels":[{"id":695908956,"url":"https://api.github.com/repos/MicrosoftDocs/live-share/labels/area:%20co-debug","name":"area: co-debug","color":"FFFFFF","default":false},{"id":692609745,"url":"https://api.github.com/repos/MicrosoftDocs/live-share/labels/bug","name":"bug","color":"ee0701","default":true},{"id":695907990,"url":"https://api.github.com/repos/MicrosoftDocs/live-share/labels/vscode","name":"vscode","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-16T01:26:11Z","updated_at":"2018-05-17T21:15:41Z","closed_at":null,"author_association":"NONE","body":"<!-- \r\nFor Visual Studio problems/feedback, please use the \"Report a Problem...\" feature built into the tool. See https://aka.ms/vsls-vsproblem.\r\n\r\nFor VS Code issues, attach verbose logs as follows:\r\n1. Press F1 (or Ctrl-Shift-P), type \"export logs\" and run the \"Live Share: Export Logs\" command.\r\n2. Drag and drop the zip to the issue on this screen and wait for it to upload before creating the issue.\r\n\r\nFor feature requests, please include enough of this same info so we know if the request is tool or language/platform specific.\r\n-->\r\n\r\n\r\n**Product and Version** [VS/VSCode]: VS Code 1.23.1 (also on VS Code Insiders)\r\n**OS Version** [macOS/Windows]: macOS (also reproduced on Windows)\r\n**Live Share Extension Version**: 0.3.114\r\n**Target Platform or Language** [e.g. Node.js]: Apex Debugger\r\n\r\nAttached is the zip file of the results of \"Live Share: Export Logs\" command\r\n[vslive-issue.zip](https://github.com/MicrosoftDocs/live-share/files/2007165/vslive-issue.zip)\r\n\r\n**Steps to Reproduce / Scenario:**\r\n\r\n0. Install the necessary extensions (the zip file has the list of extensions). You don't need to start a VS Live Session. Just having the extension installed is sufficient.\r\n1. Check out https://github.com/forcedotcom/sfdx-dreamhouse/tree/nick/trailheadx-debuggers\r\n2. Launch \"Apex Replay Debugger (Reillustrate Issue).\r\n3. Hit the `HandleRequestAsync` error.\r\n4. Disable the VS Live extension.\r\n5.  Launch \"Apex Replay Debugger (Reillustrate Issue).\r\n6. Notice that you are able to debug as normal.\r\n\r\nAttached is the .gif.\r\n\r\n![vslive](https://user-images.githubusercontent.com/54414/40091404-373a919e-586c-11e8-8a56-cfa153c69afe.gif)\r\n\r\nI suspect the issue is because we have a special initialization sequence as part of the launch sequence. Basically we augment our language server to also be able to receive an additional `getLineBreakpointInfo` JSON-RPC request. And the debugger sends this request over to the language server as it starts to get line breakpoint information. We need some special information about our code files that only an active language server can provide before we can set the breakpoints (it's a special artifact of how our system works).\r\n\r\nThis is only affecting the debugger. Our augmented language server for Apex runs fine with VS Live in VS Code.\r\n\r\nHere's the relevant portion of the log:\r\n\r\n```\r\n[2018-05-16 00:56:56.561 Debug.HostAdapter I] Microsoft.Cascade.VSCodeHostAdapter v0.3.114.65050 (pid: 95947)\r\n[2018-05-16 00:56:56.669 Debug.HostAdapter V] ctor proxyType:apex-replay proxyDebugServer:\r\n[2018-05-16 00:56:56.946 Debug.HostAdapter V] [Trace]<--   C (initialize-1): {\"command\":\"initialize\",\"arguments\":{\"clientID\":\"vscode\",\"clientName\":\"Visual Studio Code\",\"adapterID\":\"vslsShare\",\"pathFormat\":\"path\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"supportsVariableType\":true,\"supportsVariablePaging\":true,\"supportsRunInTerminalRequest\":true,\"locale\":\"en\"},\"type\":\"request\",\"seq\":1}\r\n[2018-05-16 00:56:57.057 Debug.HostAdapter V] HandleRequestWithHostAsync request:InitializeRequest\r\n[2018-05-16 00:56:57.213 Debug.HostAdapter V] LaunchAdapterHostAsync NodeFork on program:/Users/nchen/.vscode/extensions/salesforce.salesforcedx-vscode-replay-debugger-42.14.0/out/src/adapter/apexReplayDebug.js\r\n[2018-05-16 00:56:57.247 Debug.HostAdapter V] < #1 [1] VSCodeAdapterService.nodeFork(<121:c20c1a06>)\r\n[2018-05-16 00:56:57.488 Debug.HostAdapter V] > #1 [1] Result: <>\r\n[2018-05-16 00:56:57.495 Debug.HostAdapter V] LaunchAdapterHostAsync connecting to stdIn:/var/folders/4v/29d6fthd3bv1zmwn9rj7rq2rlc95ms/T/CoreFxPipe_vscode-4be09715f6f7cec4b536.sock stdOut:/var/folders/4v/29d6fthd3bv1zmwn9rj7rq2rlc95ms/T/CoreFxPipe_vscode-956bf3769ebd38469da9.sock\r\n[2018-05-16 00:56:57.523 Debug.HostAdapter V] [Trace]#host# --> C (initialize-1): {\"command\":\"initialize\",\"arguments\":{\"clientID\":\"vscode\",\"clientName\":\"Visual Studio Code\",\"adapterID\":\"apex-replay\",\"locale\":\"en\",\"linesStartAt1\":true,\"columnsStartAt1\":true,\"pathFormat\":\"path\",\"supportsVariableType\":true,\"supportsVariablePaging\":true,\"supportsRunInTerminalRequest\":true},\"seq\":1,\"type\":\"request\"}\r\n[2018-05-16 00:56:57.553 Debug.HostAdapter V] [Trace]#host# <--   E (getLineBreakpointInfo): {\"seq\":1,\"type\":\"event\",\"event\":\"getLineBreakpointInfo\"}\r\n\r\n// I think this is the error, since we do something special here.\r\n[2018-05-16 00:56:57.554 Debug.HostAdapter V] [Warning]#host# No handler registered for event of type 'getLineBreakpointInfo'!\r\n\r\n[2018-05-16 00:57:27.125 Debug.HostAdapter V] [Trace]--> R (initialize-1): {\"request_seq\":1,\"success\":false,\"command\":\"initialize\",\"message\":\"HandleRequestAsync timeout\",\"body\":{},\"seq\":1,\"type\":\"response\"}\r\n[2018-05-16 00:57:27.129 Debug.HostAdapter V] [Trace]<--   C (disconnect-2): {\"command\":\"disconnect\",\"arguments\":{\"restart\":false},\"type\":\"request\",\"seq\":2}\r\n[2018-05-16 00:57:27.136 Debug.HostAdapter V] HandleRequestWithHostAsync request:DisconnectRequest\r\n[2018-05-16 00:57:27.144 Debug.HostAdapter V] [Trace]#host# --> C (disconnect-2): {\"command\":\"disconnect\",\"arguments\":{},\"seq\":2,\"type\":\"request\"}\r\n[2018-05-16 00:57:27.146 Debug.HostAdapter V] [Trace]#host# <--   E (output): {\"seq\":2,\"type\":\"event\",\"event\":\"output\",\"body\":{\"category\":\"stdout\",\"output\":\"Apex Replay Debugger session terminated.\\n\",\"column\":0}}\r\n[2018-05-16 00:57:27.163 Debug.HostAdapter V] [Trace]--> E (output): {\"event\":\"output\",\"body\":{\"category\":\"stdout\",\"output\":\"Apex Replay Debugger session terminated.\\n\",\"column\":0},\"seq\":2,\"type\":\"event\"}\r\n[2018-05-16 00:57:27.172 Debug.HostAdapter V] [Trace]#host# <--   R (disconnect-2): {\"seq\":3,\"type\":\"response\",\"request_seq\":2,\"command\":\"disconnect\",\"success\":true}\r\n[2018-05-16 00:57:27.181 Debug.HostAdapter V] [Trace]--> R (disconnect-2): {\"request_seq\":2,\"success\":true,\"command\":\"disconnect\",\"body\":{},\"seq\":3,\"type\":\"response\"}\r\n```\r\n\r\nHere's the relevant portion of the code: https://github.com/forcedotcom/salesforcedx-vscode/blob/develop/packages/salesforcedx-vscode-replay-debugger/src/index.ts#L45\r\n \r\n**If** my assumptions are right, I suspect that we need to do something with that special sequence. I'm new to the VS Live protocol so any pointers here would be appreciated.\r\n\r\nQuestions:\r\n\r\n1. Could we confirm if the extra `getLineBreakpointInfo` is indeed the issue? It's reported just as a WARNING in the log instead of an error so it's hard to confirm.\r\n2. Is there a reason why VS Live is blocking the launch of the debugger? Note that there is no live session - this is just a normal session with VS Live installed.\r\n2a. Is there a way we can make VS Live work with our additional special request?\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/comments/390014283","html_url":"https://github.com/MicrosoftDocs/live-share/issues/396#issuecomment-390014283","issue_url":"https://api.github.com/repos/MicrosoftDocs/live-share/issues/396","id":390014283,"user":{"login":"lostintangent","id":116461,"avatar_url":"https://avatars3.githubusercontent.com/u/116461?v=4","gravatar_id":"","url":"https://api.github.com/users/lostintangent","html_url":"https://github.com/lostintangent","followers_url":"https://api.github.com/users/lostintangent/followers","following_url":"https://api.github.com/users/lostintangent/following{/other_user}","gists_url":"https://api.github.com/users/lostintangent/gists{/gist_id}","starred_url":"https://api.github.com/users/lostintangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostintangent/subscriptions","organizations_url":"https://api.github.com/users/lostintangent/orgs","repos_url":"https://api.github.com/users/lostintangent/repos","events_url":"https://api.github.com/users/lostintangent/events{/privacy}","received_events_url":"https://api.github.com/users/lostintangent/received_events","type":"User","site_admin":false},"created_at":"2018-05-17T21:15:41Z","updated_at":"2018-05-17T21:15:41Z","author_association":"COLLABORATOR","body":"@vazexqi As an update, the issue was in fact the custom events you were firing. We're in the process of fixing that right now, and will get you another update ASAP!"}}
{"actor":{"display_login":"lostintangent"}}