{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/62265140","id":62265140,"diff_hunk":"@@ -131,35 +132,29 @@ internal sealed class WorkspaceVariableProvider : RSessionChangeWatcher, IVariab\n                 var sessionProvider = EditorShell.Current.ExportProvider.GetExportedValueOrDefault<IRSessionProvider>();\n                 var session = sessionProvider.GetOrCreate(GuidList.InteractiveWindowRSessionGuid);\n                 if (session.IsHostRunning) {\n-                    var debugSessionProvider = EditorShell.Current.ExportProvider.GetExportedValueOrDefault<IDebugSessionProvider>();\n-                    if (debugSessionProvider != null) {\n-                        var debugSession = await debugSessionProvider.GetDebugSessionAsync(Session);\n-                        if (debugSession != null) {\n-                            var stackFrames = await debugSession.GetStackFramesAsync();\n-\n-                            var globalStackFrame = stackFrames.FirstOrDefault(s => s.IsGlobal);\n-                            if (globalStackFrame != null) {\n-                                const DebugEvaluationResultFields fields =\n-                                    DebugEvaluationResultFields.Expression |\n-                                    DebugEvaluationResultFields.Kind |\n-                                    DebugEvaluationResultFields.TypeName |\n-                                    DebugEvaluationResultFields.Classes |\n-                                    DebugEvaluationResultFields.Length |\n-                                    DebugEvaluationResultFields.SlotCount |\n-                                    DebugEvaluationResultFields.AttrCount |\n-                                    DebugEvaluationResultFields.Dim |\n-                                    DebugEvaluationResultFields.Flags;\n-                                DebugEvaluationResult evaluation = await globalStackFrame.EvaluateAsync(\"base::environment()\", \"Global Environment\", fields, \"rtvs:::make_repr_str()\");\n-                                var e = new RSessionDataObject(evaluation);  // root level doesn't truncate children and return every variables\n-\n-                                _topLevelVariables.Clear();\n-\n-                                var children = await e.GetChildrenAsync();\n-                                if (children != null) {\n-                                    foreach (var x in children) {\n-                                        _topLevelVariables[x.Name] = x; // TODO: BUGBUG: this doesn't address removed variables\n-                                    }\n-                                }\n+                    var stackFrames = await session.TracebackAsync();\n+\n+                    var globalStackFrame = stackFrames.FirstOrDefault(s => s.IsGlobal);\n+                    if (globalStackFrame != null) {\n+                        const REvaluationResultProperties fields =\n+                            REvaluationResultProperties.ExpressionProperty |\n+                            REvaluationResultProperties.AccessorKindProperty |\n+                            REvaluationResultProperties.TypeNameProperty |\n+                            REvaluationResultProperties.ClassesProperty |\n+                            REvaluationResultProperties.LengthProperty |\n+                            REvaluationResultProperties.SlotCountProperty |\n+                            REvaluationResultProperties.AttributeCountProperty |\n+                            REvaluationResultProperties.DimProperty |\n+                            REvaluationResultProperties.FlagsProperty;","path":"src/R/Editor/Impl/Data/WorkspaceVariableProvider.cs","position":59,"original_position":59,"commit_id":"b6a445fb207850f71aeeb8c84023ae57547bf5cf","original_commit_id":"b6a445fb207850f71aeeb8c84023ae57547bf5cf","user":{"login":"int19h","id":1175142,"avatar_url":"https://avatars.githubusercontent.com/u/1175142?v=3","gravatar_id":"","url":"https://api.github.com/users/int19h","html_url":"https://github.com/int19h","followers_url":"https://api.github.com/users/int19h/followers","following_url":"https://api.github.com/users/int19h/following{/other_user}","gists_url":"https://api.github.com/users/int19h/gists{/gist_id}","starred_url":"https://api.github.com/users/int19h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/int19h/subscriptions","organizations_url":"https://api.github.com/users/int19h/orgs","repos_url":"https://api.github.com/users/int19h/repos","events_url":"https://api.github.com/users/int19h/events{/privacy}","received_events_url":"https://api.github.com/users/int19h/received_events","type":"User","site_admin":false},"body":"Nope, just didn't finish going over all these before committing by mistake. I'll do `using static` in all places where there's more than a couple.","created_at":"2016-05-05T22:22:34Z","updated_at":"2016-05-05T22:22:34Z","html_url":"https://github.com/Microsoft/RTVS/pull/1731#discussion_r62265140","pull_request_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/62265140"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/1731#discussion_r62265140"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731","id":68950973,"html_url":"https://github.com/Microsoft/RTVS/pull/1731","diff_url":"https://github.com/Microsoft/RTVS/pull/1731.diff","patch_url":"https://github.com/Microsoft/RTVS/pull/1731.patch","issue_url":"https://api.github.com/repos/Microsoft/RTVS/issues/1731","number":1731,"state":"open","locked":false,"title":"Debugger refactoring","user":{"login":"int19h","id":1175142,"avatar_url":"https://avatars.githubusercontent.com/u/1175142?v=3","gravatar_id":"","url":"https://api.github.com/users/int19h","html_url":"https://github.com/int19h","followers_url":"https://api.github.com/users/int19h/followers","following_url":"https://api.github.com/users/int19h/following{/other_user}","gists_url":"https://api.github.com/users/int19h/gists{/gist_id}","starred_url":"https://api.github.com/users/int19h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/int19h/subscriptions","organizations_url":"https://api.github.com/users/int19h/orgs","repos_url":"https://api.github.com/users/int19h/repos","events_url":"https://api.github.com/users/int19h/events{/privacy}","received_events_url":"https://api.github.com/users/int19h/received_events","type":"User","site_admin":false},"body":"* Split evaluation, stack tracing, and execution tracing (stepping and breakpoints) into separate components, and rename types and members to be more descriptive of the functions they perform.\r\n\r\n* Use interfaces for the entirety of the resulting public API surface.\r\n\r\n* Rewrite unit tests to use NSubstitute instead of hand-coded mocks and match objects.\r\n\r\n* Various small fixes.","created_at":"2016-05-05T00:01:27Z","updated_at":"2016-05-05T22:22:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f20daefbbedfdcd7cce81a422f8c470fa845e57","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731/commits","review_comments_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731/comments","review_comment_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/issues/1731/comments","statuses_url":"https://api.github.com/repos/Microsoft/RTVS/statuses/b6a445fb207850f71aeeb8c84023ae57547bf5cf","head":{"label":"int19h:dbgref","ref":"dbgref","sha":"b6a445fb207850f71aeeb8c84023ae57547bf5cf","user":{"login":"int19h","id":1175142,"avatar_url":"https://avatars.githubusercontent.com/u/1175142?v=3","gravatar_id":"","url":"https://api.github.com/users/int19h","html_url":"https://github.com/int19h","followers_url":"https://api.github.com/users/int19h/followers","following_url":"https://api.github.com/users/int19h/following{/other_user}","gists_url":"https://api.github.com/users/int19h/gists{/gist_id}","starred_url":"https://api.github.com/users/int19h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/int19h/subscriptions","organizations_url":"https://api.github.com/users/int19h/orgs","repos_url":"https://api.github.com/users/int19h/repos","events_url":"https://api.github.com/users/int19h/events{/privacy}","received_events_url":"https://api.github.com/users/int19h/received_events","type":"User","site_admin":false},"repo":{"id":53513140,"name":"RTVS","full_name":"int19h/RTVS","owner":{"login":"int19h","id":1175142,"avatar_url":"https://avatars.githubusercontent.com/u/1175142?v=3","gravatar_id":"","url":"https://api.github.com/users/int19h","html_url":"https://github.com/int19h","followers_url":"https://api.github.com/users/int19h/followers","following_url":"https://api.github.com/users/int19h/following{/other_user}","gists_url":"https://api.github.com/users/int19h/gists{/gist_id}","starred_url":"https://api.github.com/users/int19h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/int19h/subscriptions","organizations_url":"https://api.github.com/users/int19h/orgs","repos_url":"https://api.github.com/users/int19h/repos","events_url":"https://api.github.com/users/int19h/events{/privacy}","received_events_url":"https://api.github.com/users/int19h/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/int19h/RTVS","description":"R Tools for Visual Studio.","fork":true,"url":"https://api.github.com/repos/int19h/RTVS","forks_url":"https://api.github.com/repos/int19h/RTVS/forks","keys_url":"https://api.github.com/repos/int19h/RTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/int19h/RTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/int19h/RTVS/teams","hooks_url":"https://api.github.com/repos/int19h/RTVS/hooks","issue_events_url":"https://api.github.com/repos/int19h/RTVS/issues/events{/number}","events_url":"https://api.github.com/repos/int19h/RTVS/events","assignees_url":"https://api.github.com/repos/int19h/RTVS/assignees{/user}","branches_url":"https://api.github.com/repos/int19h/RTVS/branches{/branch}","tags_url":"https://api.github.com/repos/int19h/RTVS/tags","blobs_url":"https://api.github.com/repos/int19h/RTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/int19h/RTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/int19h/RTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/int19h/RTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/int19h/RTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/int19h/RTVS/languages","stargazers_url":"https://api.github.com/repos/int19h/RTVS/stargazers","contributors_url":"https://api.github.com/repos/int19h/RTVS/contributors","subscribers_url":"https://api.github.com/repos/int19h/RTVS/subscribers","subscription_url":"https://api.github.com/repos/int19h/RTVS/subscription","commits_url":"https://api.github.com/repos/int19h/RTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/int19h/RTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/int19h/RTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/int19h/RTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/int19h/RTVS/contents/{+path}","compare_url":"https://api.github.com/repos/int19h/RTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/int19h/RTVS/merges","archive_url":"https://api.github.com/repos/int19h/RTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/int19h/RTVS/downloads","issues_url":"https://api.github.com/repos/int19h/RTVS/issues{/number}","pulls_url":"https://api.github.com/repos/int19h/RTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/int19h/RTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/int19h/RTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/int19h/RTVS/labels{/name}","releases_url":"https://api.github.com/repos/int19h/RTVS/releases{/id}","deployments_url":"https://api.github.com/repos/int19h/RTVS/deployments","created_at":"2016-03-09T16:28:28Z","updated_at":"2016-03-09T16:28:34Z","pushed_at":"2016-05-05T22:13:34Z","git_url":"git://github.com/int19h/RTVS.git","ssh_url":"git@github.com:int19h/RTVS.git","clone_url":"https://github.com/int19h/RTVS.git","svn_url":"https://github.com/int19h/RTVS","homepage":null,"size":45572,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"9b267f51472a0d5807eb8e475992ad8350b44624","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":38640473,"name":"RTVS","full_name":"Microsoft/RTVS","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/RTVS","description":"R Tools for Visual Studio.","fork":false,"url":"https://api.github.com/repos/Microsoft/RTVS","forks_url":"https://api.github.com/repos/Microsoft/RTVS/forks","keys_url":"https://api.github.com/repos/Microsoft/RTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/RTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/RTVS/teams","hooks_url":"https://api.github.com/repos/Microsoft/RTVS/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/RTVS/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/RTVS/events","assignees_url":"https://api.github.com/repos/Microsoft/RTVS/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/RTVS/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/RTVS/tags","blobs_url":"https://api.github.com/repos/Microsoft/RTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/RTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/RTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/RTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/RTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/RTVS/languages","stargazers_url":"https://api.github.com/repos/Microsoft/RTVS/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/RTVS/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/RTVS/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/RTVS/subscription","commits_url":"https://api.github.com/repos/Microsoft/RTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/RTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/RTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/RTVS/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/RTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/RTVS/merges","archive_url":"https://api.github.com/repos/Microsoft/RTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/RTVS/downloads","issues_url":"https://api.github.com/repos/Microsoft/RTVS/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/RTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/RTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/RTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/RTVS/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/RTVS/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/RTVS/deployments","created_at":"2015-07-06T19:14:09Z","updated_at":"2016-05-05T15:28:30Z","pushed_at":"2016-05-05T22:13:35Z","git_url":"git://github.com/Microsoft/RTVS.git","ssh_url":"git@github.com:Microsoft/RTVS.git","clone_url":"https://github.com/Microsoft/RTVS.git","svn_url":"https://github.com/Microsoft/RTVS","homepage":null,"size":45851,"stargazers_count":141,"watchers_count":141,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":268,"forks":26,"open_issues":268,"watchers":141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/1731"},"issue":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/1731"},"comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/1731/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1731/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/RTVS/statuses/b6a445fb207850f71aeeb8c84023ae57547bf5cf"}}}}