{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/poshtools/pulls/comments/33315302","id":33315302,"diff_hunk":"@@ -129,5 +142,13 @@ public static class DebugEngineConstants\n \r\n         public const string PowerShellHostProcessLogTag = \"[{0}]:\";\r\n         public const string PowerShellHostProcessLogFormat = PowerShellHostProcessLogTag + \"{1}\";\r\n+\r\n+        /// <summary>\r\n+        /// Lookup table for error messages pertaining to opening files in the various debugging scenarios.\r\n+        /// </summary>\r\n+        public static readonly string[] FileOpenErrorMessages = { \"Failed to open file\", // LOCAL\r","path":"PowershellTools.Common/Debugging/DebugEngineConstants.cs","position":28,"original_position":28,"commit_id":"f138c4d2713c7840ce61e93424e66970d51bbfb4","original_commit_id":"f138c4d2713c7840ce61e93424e66970d51bbfb4","user":{"login":"AndreSayreMSFT","id":10080679,"avatar_url":"https://avatars.githubusercontent.com/u/10080679?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreSayreMSFT","html_url":"https://github.com/AndreSayreMSFT","followers_url":"https://api.github.com/users/AndreSayreMSFT/followers","following_url":"https://api.github.com/users/AndreSayreMSFT/following{/other_user}","gists_url":"https://api.github.com/users/AndreSayreMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreSayreMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreSayreMSFT/subscriptions","organizations_url":"https://api.github.com/users/AndreSayreMSFT/orgs","repos_url":"https://api.github.com/users/AndreSayreMSFT/repos","events_url":"https://api.github.com/users/AndreSayreMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/AndreSayreMSFT/received_events","type":"User","site_admin":false},"body":"string[] lookup tables are prone to error, as there's no compiletime check in regards to input and access. [Example: What if we add more DebugScenarios, but we don't immediately know we need to update this?]\r\n\r\nPlease either switch/case in a method when passing in the DebugScenario enum, or have a typed mapping.\r\n","created_at":"2015-06-25T23:14:44Z","updated_at":"2015-06-25T23:14:44Z","html_url":"https://github.com/Microsoft/poshtools/pull/620#discussion_r33315302","pull_request_url":"https://api.github.com/repos/Microsoft/poshtools/pulls/620","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/comments/33315302"},"html":{"href":"https://github.com/Microsoft/poshtools/pull/620#discussion_r33315302"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/620"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/poshtools/pulls/620","id":38360342,"html_url":"https://github.com/Microsoft/poshtools/pull/620","diff_url":"https://github.com/Microsoft/poshtools/pull/620.diff","patch_url":"https://github.com/Microsoft/poshtools/pull/620.patch","issue_url":"https://api.github.com/repos/Microsoft/poshtools/issues/620","number":620,"state":"open","locked":false,"title":"Local Process Attaching","user":{"login":"MrayerMSFT","id":12631548,"avatar_url":"https://avatars.githubusercontent.com/u/12631548?v=3","gravatar_id":"","url":"https://api.github.com/users/MrayerMSFT","html_url":"https://github.com/MrayerMSFT","followers_url":"https://api.github.com/users/MrayerMSFT/followers","following_url":"https://api.github.com/users/MrayerMSFT/following{/other_user}","gists_url":"https://api.github.com/users/MrayerMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/MrayerMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrayerMSFT/subscriptions","organizations_url":"https://api.github.com/users/MrayerMSFT/orgs","repos_url":"https://api.github.com/users/MrayerMSFT/repos","events_url":"https://api.github.com/users/MrayerMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/MrayerMSFT/received_events","type":"User","site_admin":false},"body":"@EricMSFT @AndreSayreMSFT @HuanhuanSunMSFT \r\n\r\nCode in this pull request contains initial/work in progress code for allowing users to attach and debug PowerShell scripts running on their local machines. This feature requires PowerShell v5.0+ (as can be seen in the version check in AttachToRunspace). Example of using feature:\r\n\r\nStart a script:\r\n![one](https://cloud.githubusercontent.com/assets/12631548/8312149/eee1a63a-198f-11e5-8763-0c0e894c1467.PNG)\r\n\r\nOpen the “Attach” dialog and choose to debug PowerShell code (very important step!):\r\n![two](https://cloud.githubusercontent.com/assets/12631548/8312156/f34d8d06-198f-11e5-8c92-4ba153ad9603.PNG)\r\n\r\nAttach to your process:\r\n![three](https://cloud.githubusercontent.com/assets/12631548/8312158/f5a7d854-198f-11e5-80da-32d6b22b16f7.PNG)\r\n\r\nDebug as normal:\r\n![four](https://cloud.githubusercontent.com/assets/12631548/8312167/fcccb06e-198f-11e5-8881-1c062bb7f062.PNG)\r\n\r\nDo note that removing breakpoints does not work at the moment, as is consistent with the current build. Some functions/user functions also appear to step weirdly. This is still being looked into. In general, the abilities of this feature are limited to the abilities of the Debug-Runspace cmdlet and should provide an experience similar to that of remote session debugging.","created_at":"2015-06-23T17:14:22Z","updated_at":"2015-06-25T23:14:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c983de0b707f390326ed65623cd213dc0495c99","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/poshtools/pulls/620/commits","review_comments_url":"https://api.github.com/repos/Microsoft/poshtools/pulls/620/comments","review_comment_url":"https://api.github.com/repos/Microsoft/poshtools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/poshtools/issues/620/comments","statuses_url":"https://api.github.com/repos/Microsoft/poshtools/statuses/f138c4d2713c7840ce61e93424e66970d51bbfb4","head":{"label":"Microsoft:remotedbg-local-attach","ref":"remotedbg-local-attach","sha":"f138c4d2713c7840ce61e93424e66970d51bbfb4","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":27854486,"name":"poshtools","full_name":"Microsoft/poshtools","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/poshtools","description":"PowerShell integration for Visual Studio","fork":true,"url":"https://api.github.com/repos/Microsoft/poshtools","forks_url":"https://api.github.com/repos/Microsoft/poshtools/forks","keys_url":"https://api.github.com/repos/Microsoft/poshtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/poshtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/poshtools/teams","hooks_url":"https://api.github.com/repos/Microsoft/poshtools/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/poshtools/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/poshtools/events","assignees_url":"https://api.github.com/repos/Microsoft/poshtools/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/poshtools/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/poshtools/tags","blobs_url":"https://api.github.com/repos/Microsoft/poshtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/poshtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/poshtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/poshtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/poshtools/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/poshtools/languages","stargazers_url":"https://api.github.com/repos/Microsoft/poshtools/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/poshtools/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/poshtools/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/poshtools/subscription","commits_url":"https://api.github.com/repos/Microsoft/poshtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/poshtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/poshtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/poshtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/poshtools/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/poshtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/poshtools/merges","archive_url":"https://api.github.com/repos/Microsoft/poshtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/poshtools/downloads","issues_url":"https://api.github.com/repos/Microsoft/poshtools/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/poshtools/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/poshtools/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/poshtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/poshtools/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/poshtools/releases{/id}","created_at":"2014-12-11T04:44:03Z","updated_at":"2015-06-24T11:14:34Z","pushed_at":"2015-06-25T18:27:35Z","git_url":"git://github.com/Microsoft/poshtools.git","ssh_url":"git@github.com:Microsoft/poshtools.git","clone_url":"https://github.com/Microsoft/poshtools.git","svn_url":"https://github.com/Microsoft/poshtools","homepage":"http://www.visualstudio.com/","size":12291,"stargazers_count":109,"watchers_count":109,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":143,"forks":12,"open_issues":143,"watchers":109,"default_branch":"dev"}},"base":{"label":"Microsoft:dev","ref":"dev","sha":"a4a64b87c94352fbfea349304997e322676585cc","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":27854486,"name":"poshtools","full_name":"Microsoft/poshtools","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/poshtools","description":"PowerShell integration for Visual Studio","fork":true,"url":"https://api.github.com/repos/Microsoft/poshtools","forks_url":"https://api.github.com/repos/Microsoft/poshtools/forks","keys_url":"https://api.github.com/repos/Microsoft/poshtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/poshtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/poshtools/teams","hooks_url":"https://api.github.com/repos/Microsoft/poshtools/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/poshtools/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/poshtools/events","assignees_url":"https://api.github.com/repos/Microsoft/poshtools/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/poshtools/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/poshtools/tags","blobs_url":"https://api.github.com/repos/Microsoft/poshtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/poshtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/poshtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/poshtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/poshtools/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/poshtools/languages","stargazers_url":"https://api.github.com/repos/Microsoft/poshtools/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/poshtools/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/poshtools/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/poshtools/subscription","commits_url":"https://api.github.com/repos/Microsoft/poshtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/poshtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/poshtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/poshtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/poshtools/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/poshtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/poshtools/merges","archive_url":"https://api.github.com/repos/Microsoft/poshtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/poshtools/downloads","issues_url":"https://api.github.com/repos/Microsoft/poshtools/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/poshtools/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/poshtools/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/poshtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/poshtools/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/poshtools/releases{/id}","created_at":"2014-12-11T04:44:03Z","updated_at":"2015-06-24T11:14:34Z","pushed_at":"2015-06-25T18:27:35Z","git_url":"git://github.com/Microsoft/poshtools.git","ssh_url":"git@github.com:Microsoft/poshtools.git","clone_url":"https://github.com/Microsoft/poshtools.git","svn_url":"https://github.com/Microsoft/poshtools","homepage":"http://www.visualstudio.com/","size":12291,"stargazers_count":109,"watchers_count":109,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":143,"forks":12,"open_issues":143,"watchers":109,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/620"},"html":{"href":"https://github.com/Microsoft/poshtools/pull/620"},"issue":{"href":"https://api.github.com/repos/Microsoft/poshtools/issues/620"},"comments":{"href":"https://api.github.com/repos/Microsoft/poshtools/issues/620/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/620/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/poshtools/pulls/620/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/poshtools/statuses/f138c4d2713c7840ce61e93424e66970d51bbfb4"}}}}