{"id":438,"date":"2017-07-03T18:05:59","date_gmt":"2017-07-03T16:05:59","guid":{"rendered":"http:\/\/ekhart.pl\/?p=438"},"modified":"2017-07-03T18:07:13","modified_gmt":"2017-07-03T16:07:13","slug":"438","status":"publish","type":"post","link":"https:\/\/ekhart.pl\/index.php\/2017\/07\/03\/438\/","title":{"rendered":"Visual Studio Unity Debug.Log macro"},"content":{"rendered":"<p>To be clear, I wasn&#8217;t satisfied by previous solution (<a href=\"https:\/\/ekhart.pl\/index.php\/2017\/06\/26\/visual-studio-unity-debug-log-snippet\/\">Visual Studio Unity Debug.Log snippet<\/a>).<!--more--><\/p>\n<p>It&#8217;s too much steps. It was, little faster than normal, true. But we also should not only to simpler tools. It would be better, if we could hit one shortcut. And all that magic happens.<\/p>\n<p>I use other tool. Macros. I tried <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=VisualStudioPlatformTeam.MacrosforVisualStudio\">Macros for Visual Studio<\/a> extension. But JS interface was somehow not enough. So I use\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=SergeyVlasov.VisualCommander\">Visual Commander<\/a>. You write\u00a0macros using\u00a0 Visual Basic or C# so it&#8217;s much convenient.<\/p>\n<ol>\n<li>install <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=SergeyVlasov.VisualCommander\">Visual Commander<\/a> (download it through page, or\u00a0VS \/ Tools \/ Extensions and Updates \/ Online &#8211; serach <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=SergeyVlasov.VisualCommander\">Visual Commander<\/a>)<br \/>\n<a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"439\" data-permalink=\"https:\/\/ekhart.pl\/index.php\/2017\/07\/03\/438\/obraz-bez-nazwy-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?fit=960%2C245&amp;ssl=1\" data-orig-size=\"960,245\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"install\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?fit=300%2C77&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?fit=525%2C134&amp;ssl=1\" class=\"alignnone size-full wp-image-439\" src=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?resize=525%2C134&#038;ssl=1\" alt=\"\" width=\"525\" height=\"134\" srcset=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?w=960&amp;ssl=1 960w, https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?resize=300%2C77&amp;ssl=1 300w, https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/Obraz-bez-nazwy.png?resize=768%2C196&amp;ssl=1 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" data-recalc-dims=\"1\" \/><\/a><\/li>\n<li>restart Visual Studio<\/li>\n<li>download\u00a0my <a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/debuglog.zip\">debuglog.zip<\/a> script &amp; unpack it<\/li>\n<li>import it: VS \/ VCmd \/ Import \/ choose file<br \/>\n<a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"442\" data-permalink=\"https:\/\/ekhart.pl\/index.php\/2017\/07\/03\/438\/2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?fit=330%2C260&amp;ssl=1\" data-orig-size=\"330,260\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?fit=300%2C236&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?fit=330%2C260&amp;ssl=1\" class=\"alignnone size-full wp-image-442\" src=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?resize=330%2C260&#038;ssl=1\" alt=\"\" width=\"330\" height=\"260\" srcset=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?w=330&amp;ssl=1 330w, https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/2.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"(max-width: 330px) 100vw, 330px\" data-recalc-dims=\"1\" \/><\/a><\/li>\n<li>set shortcut via\u00a0VS \/ Tools \/ Options\u2026 \/ Keyboard<br \/>\n<a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"443\" data-permalink=\"https:\/\/ekhart.pl\/index.php\/2017\/07\/03\/438\/attachment\/32\/\" data-orig-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?fit=144%2C519&amp;ssl=1\" data-orig-size=\"144,519\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"32\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?fit=83%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?fit=144%2C519&amp;ssl=1\" class=\"alignnone size-full wp-image-443\" src=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?resize=144%2C519&#038;ssl=1\" alt=\"\" width=\"144\" height=\"519\" srcset=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?w=144&amp;ssl=1 144w, https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/32.png?resize=83%2C300&amp;ssl=1 83w\" sizes=\"(max-width: 144px) 100vw, 144px\" data-recalc-dims=\"1\" \/><\/a><\/li>\n<li>Search for vcmd (VCmd.Command01, 2, &#8230;)<br \/>\n<a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"444\" data-permalink=\"https:\/\/ekhart.pl\/index.php\/2017\/07\/03\/438\/4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?fit=755%2C510&amp;ssl=1\" data-orig-size=\"755,510\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?fit=300%2C203&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?fit=525%2C355&amp;ssl=1\" class=\"alignnone size-full wp-image-444\" src=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?resize=525%2C355&#038;ssl=1\" alt=\"\" width=\"525\" height=\"355\" srcset=\"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?w=755&amp;ssl=1 755w, https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/4.png?resize=300%2C203&amp;ssl=1 300w\" sizes=\"(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" data-recalc-dims=\"1\" \/><\/a><\/li>\n<li>assign your shortcut (I choose Ctrl+M, 1, 2, &#8230;)<\/li>\n<\/ol>\n<p>So now we just move cursor to variable. Hit Ctrl+M, 1 (or other number of command)<\/p>\n<div style=\"width: 525px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-438-1\" width=\"525\" height=\"187\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/macro.mp4?_=1\" \/><a href=\"https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/macro.mp4\">https:\/\/ekhart.pl\/wp-content\/uploads\/2017\/07\/macro.mp4<\/a><\/video><\/div>\n<p>(sorry for watermark, but you can see better key strokes).<\/p>\n<p>Enjoy it, please. \u00a0As you see it&#8217;s simple. And can&#8217;t do lot more. So how about you share with me yours ideas, or even macros to make your work little faster and less repetitive? \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To be clear, I wasn&#8217;t satisfied by previous solution (Visual Studio Unity Debug.Log snippet).<\/p>\n","protected":false},"author":1,"featured_media":459,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[32,39,40],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ekhart.pl\/wp-content\/uploads\/2017\/07\/EllenPorteus_Illustration_SydneyOperaHouse.png?fit=6000%2C3000&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s8oxcO-438","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/posts\/438"}],"collection":[{"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":16,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":461,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/posts\/438\/revisions\/461"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/media\/459"}],"wp:attachment":[{"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/media?parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/categories?post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekhart.pl\/index.php\/wp-json\/wp\/v2\/tags?post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}