<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shaykatc's WebLog : Visual Studio 2003 Tips</title><link>http://blogs.msdn.com/shaykatc/archive/category/3661.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>VS 2003 Tip #16: Free debuggers</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/29/123388.aspx</link><pubDate>Thu, 29 Apr 2004 23:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:123388</guid><dc:creator>shaykatc</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/123388.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=123388</wfw:commentRss><description>&lt;P&gt;Life at MS got busy all of a sudden so as a result I blogged less this week. To continue on my last post, the free debuggers we provide are Dbgclr and the command line cordbg. Windbg with sos.dll is a great third one too.&lt;/P&gt;
&lt;P&gt;The advantages of these debuggers is mostly their lightweight size. Cordbg was initially a sample developed by the CLR team to make sure they didnt break their code as they developed the debugging API's. The code for it is shipped in the Framework - you can find it under the Tools Developers Guide\Samples folder. Most of cordbg's functionality is available in the Everett debugger, but every now and then we find differences. The $exception feature in Everett was a feature that cordbg had initially - the ability to find the last exception thrown by a thread.&lt;/P&gt;
&lt;P&gt;Dbgclr is more of a visual debugger that also ships in the Framework SDK. It can be found in the&amp;nbsp;Guidebug folder in the SDK.&amp;nbsp;It is pared down - but is a very good managed debugger. And its lightweight.&lt;/P&gt;
&lt;P&gt;Questions? Let me know.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=123388" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #16: Part I - Free debuggers</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/21/117830.aspx</link><pubDate>Wed, 21 Apr 2004 23:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:117830</guid><dc:creator>shaykatc</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/117830.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=117830</wfw:commentRss><description>&lt;P&gt;Quick - what are the two free managed debuggers that you can get in Everett (not counting VS 2003)? And if you do know the answer (which I'm fairly certain most do) why do you use them over VS 2003? Let me know what scenarios or why!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=117830" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #15: Attaching devenv to a process from the command line.</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/19/116222.aspx</link><pubDate>Mon, 19 Apr 2004 20:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:116222</guid><dc:creator>shaykatc</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/116222.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=116222</wfw:commentRss><description>&lt;P&gt;Ziv posted: &lt;EM&gt;&amp;#8220;I've often wondered how to do the equivalent of "windbg -pn ProcessName" in VS.NET. Is it possible?&amp;#8221;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I dont know of a way to attach a devenv via a command line to a process by name, but I do know how to do it by Process ID (PID). Just run the following command from a command shell: vs7jit.exe -p PID.&amp;nbsp;Click &amp;#8220;Yes&amp;#8221; to debug with a new instance of VS7.1. Then follow through the events to attach your Everett shell to the process to debug it natively or with managed code.&lt;/P&gt;
&lt;P&gt;I just spoke to Gregg about this too, and he got that maniacal look in his eye and started telling me ways to script this or use an exe project to do this. When Gregg gets that look, I normally step away, clear the decks so that his brain can operate at full speed with no distractions and pretty much let him say or do what he wants. His net net was that he was going to blog about it, so check out &lt;A href="http://weblogs.asp.net/greggm"&gt;http://weblogs.asp.net/greggm&lt;/A&gt;&amp;nbsp;soon for more info on this.&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=116222" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #14: Impress your friends with these two arcane tips :-)</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/16/114691.aspx</link><pubDate>Fri, 16 Apr 2004 16:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:114691</guid><dc:creator>shaykatc</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/114691.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=114691</wfw:commentRss><description>&lt;P&gt;Todays tips are more on the arcane side, but when used effectively at a demo, will elevate you to a semi-godlike status in they eyes of the audience:-)&lt;/P&gt;
&lt;P&gt;The first deals with attaching to an application to debug it. Sometimes you need to attach to an app to debug it. So you go to Debug.Processes, find the process in the window and select Attach. You then get the dialog that asks you what Debug engines you want to attach with. Say you want to debug C++ (or native code as we call it) only. Well you select the Native option and go on. If you do native only debugging. There is a shortcut here to stop you from doing the two step attach. Just hit the Ctrl key and double click on the process, or select the process, hold down the Ctrl key and click attach. You will automatically attach with the native debugger. No two dialog requirement! Sorry, I don't know of a shortcut for managed.&lt;/P&gt;
&lt;P&gt;The second deal with text selection. Normally when you select multiple lines of text in the IDE its done in a flow pattern. Lets say you start selection and go from the beginning of line 1 to the middle of line 3. All of line 1 and 2 and half of line 3 get selected. Well you can select in a different way. Hold down the Alt key and select text. That will do a block select. Its kind of cool to see. I've found it useful when you have for e.g a series of declarations that are all lined up (Say int foo on line 1, int bar on line 2 etc..). You want to delete all the type declarations. Just use this selection method to select all the ints and then hit delete!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=114691" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #14: What are the requirements to debug a managed application?</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/14/113474.aspx</link><pubDate>Wed, 14 Apr 2004 22:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:113474</guid><dc:creator>shaykatc</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/113474.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=113474</wfw:commentRss><description>&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Every now and then we get a question about debugging managed code with Visual Studio. It is a little confusing so I thought I'd shed some light on it in this post. A canonical example to use here is where you have a web server on some remote machine running ASP.NET code. Something goes wrong on it and you want to debug it. &lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;To debug using Visual Studio 2003, you need to put remote debugging components on the web server. Insert the main VS disc and on the screen that says 1,2,3-&amp;nbsp;at the bottom is a link for remote component install. Click that and install the managed remote debugging components.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;Now when you go to attach to the aspnet_wp.exe process on the remote machine to managed debug it, there are two things that need to happen before you can do so.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;The first: Visual Studio uses a service to do debugging called the MDM or Machine Debug Manager. This is one of the components installed by the remote debugging components. This is needed only by Visual Studio - so if you have the framework on your machine, or cordbg you this doesnt apply. The MDM is the first gatekeeper - only two people are allowed to talk to it. Admins on the machine + members of the Debugger Users group (a group created on the machine when the mdm installs). The Debugger Users group is often misunderstood. It serves one function only -&amp;nbsp;its members are allowed access to the MDM. It gives no other permission or privelige to you.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;So lets say you add yourself to the Debugger users group and you are'nt an admin on the machine. Now comes the second test - the runtime rule for managed debugging. The rule is simple - if the managed process is running as you, or you are an admin on the machine, you can managed debug it. So now the debugger tries to attached to aspnet_wp.exe (which almost always runs as ASPNET user). You are'nt an admin so that check fails. You arent ASPNET so that check fails too and you cant attach. The trick is to get Admin on the machine, or change the config file for&amp;nbsp;aspnet_wp.exe to run as you. Both have security implications so be careful when you do this.&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: Verdana; mso-outline-level: 1"&gt;I&amp;nbsp;hope that helps you better understand what it takes to managed debug an application. For other remote ASP.NET debugging pains, Min keeps an excellent troubleshooting document at &lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A title=http://weblogs.asp.net/mkpark/articles/86872.aspx HREF="/mkpark/articles/86872.aspx"&gt;&lt;FONT color=#0000ff&gt;http://weblogs.asp.net/mkpark/articles/86872.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=113474" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #13: Getting a connection string quickly</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/13/112601.aspx</link><pubDate>Tue, 13 Apr 2004 21:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:112601</guid><dc:creator>shaykatc</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/112601.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=112601</wfw:commentRss><description>&lt;P&gt;Often I will be writing some quick code to access a database, and I'll need to add a connection string to get this. Heres a quick way to get the connection string using VS:&lt;/P&gt;
&lt;P&gt;Open Server Explorer. Right click on Data connections and select &amp;#8220;Add new connection&amp;#8221;.&amp;nbsp;Pass the information that you want to connect with to the dialog. Hit ok. Once this connection gets added to your Data Connection, right click on it and select Properties. The properties window opens up and one of the fields in it (conveniently) is Connect String. Copy and Paste it into your code. You can trim it down further if you happen to know more details about it. Voila!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=112601" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #12: Better view of data in the debugger windows</title><link>http://blogs.msdn.com/shaykatc/archive/2004/04/12/111838.aspx</link><pubDate>Mon, 12 Apr 2004 21:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:111838</guid><dc:creator>shaykatc</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/111838.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=111838</wfw:commentRss><description>&lt;P&gt;In VS 2003 we did some things in C# to make viewing of data in the debugger easier.&lt;/P&gt;
&lt;P&gt;The first problem we had was that if you expanded a type, in the watch window, you would get an unsorted list of members. This was a pain if you were searching for a particular member. So we sorted that to begin with.&lt;/P&gt;
&lt;P&gt;The second thing we did was that we made the displays of Hashtables and Arraylists easier - sort of more natural. We made it so that when you expand a Hashtable object in the watch window, you see the key value pairs. For an ArrayList we show you what the elements in the list are. This was a big difference from VS7 where you had to root around in the member nodes to find this information.&lt;/P&gt;
&lt;P&gt;Are there other data structures that you use regularly that you believe should be easy to see? Let us know.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=111838" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #11: Autocomplete on new class creation</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/29/101708.aspx</link><pubDate>Mon, 29 Mar 2004 23:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:101708</guid><dc:creator>shaykatc</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/101708.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=101708</wfw:commentRss><description>&lt;P&gt;In Everett we made a small change to Intellisense to lessen the code you had to type. Often you will new up a class and write something like:&lt;/P&gt;
&lt;P&gt;Foo x = new Foo();&lt;/P&gt;
&lt;P&gt;In VS7 you had to type out the whole thing. In Everett&amp;nbsp;we had Intellisense&amp;nbsp;pop up after the new, to autocomplete the class name. This is one of those small features which just makes Everett (to me) so much more enjoyable to use. &lt;/P&gt;
&lt;P&gt;As a side note, once we did this, one of the first bugs we saw was that if we declared x to be of type Foo higher up in the file, and then later on declared &amp;#8220;x = new&amp;#8220;, we didnt autocomplete. I am deeply appreciative of our QA team :-)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=101708" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #10: Run pre and post build commands from the C# projects</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/26/96975.aspx</link><pubDate>Fri, 26 Mar 2004 18:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:96975</guid><dc:creator>shaykatc</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/96975.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=96975</wfw:commentRss><description>&lt;P&gt;Vs7 customers complained to us that they wanted pre and post build commands that could be run from the project system. Its pretty reasonable to want to automate some tasks that you would do before or after builds, so in Everett we added this in. &lt;/P&gt;
&lt;P&gt;To get to this feature take any C# project, and check out the project properties (Project-&amp;gt;Properties). Then select Common Properties-&amp;gt;Build Events and you should see the property page for custom build steps. &lt;/P&gt;
&lt;P&gt;This syntax can include any command that is valid at the command line or in a .bat file. The name of a batch file should be preceded by &lt;B&gt;call&lt;/B&gt; to ensure that all subsequent commands will be executed. There are also a handy set of macros to help with the commands. For more information, check out the VS help on this.&lt;/P&gt;
&lt;P&gt;For those who might ask, VB doesnt support this in Everett.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=96975" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>Vs 2003 Tip#9: Turning off Dynamic Help</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/18/92193.aspx</link><pubDate>Thu, 18 Mar 2004 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:92193</guid><dc:creator>shaykatc</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/92193.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=92193</wfw:commentRss><description>Joen blogs about this &lt;A href="http://weblogs.asp.net/joen/archive/2004/03/15/89975.aspx"&gt;here&lt;/A&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=92193" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #8: Exception information in the Object browser</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/16/90704.aspx</link><pubDate>Tue, 16 Mar 2004 21:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:90704</guid><dc:creator>shaykatc</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/90704.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=90704</wfw:commentRss><description>&lt;P&gt;One of the complaints we received from VS7 was that you couldnt tell the exceptions that a particular method could throw. We scratched our heads thinking of ways to do this, as the xml docs did contain this informattion about the class libraries. Ideally we would have liked to have put this information into intellisense, but this request came up after we had done our coding for the milestone. The thing that pushed us off the edge was a usability test we saw, where a guy remarked how painful it was not to have that information.&lt;/P&gt;
&lt;P&gt;We ended up adding this information to the object browser. To view it, try something like - Open Object Browser. Open System.IO.File and select the Open method in the right pane. At the bottom of the Object Browsers information pane (where they have method signatures and summary etc), scroll down and you'll see the Exceptions header which should list the exceptions the method can throw.&lt;/P&gt;
&lt;P&gt;Addendum #1: This is C#/J# only.&lt;/P&gt;
&lt;P&gt;Addendum#2: If you create a dll and put its xml comments file next to it and then view it through the Object browser in a C# project, you should see this for your exceptions too. The equivalent xml tags should be something of the sort: &lt;FONT size=2&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;exception cref="T:System.ArgumentOutOfRangeException"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;paramref name="index" /&amp;gt; is less than zero. &amp;lt;para&amp;gt;-or-&amp;lt;/para&amp;gt;&amp;lt;para&amp;gt;&amp;lt;paramref name="index" /&amp;gt; is greater than &amp;lt;see langword="Count" /&amp;gt;.&amp;lt;/para&amp;gt;&amp;lt;/exception&amp;gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=90704" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #7: Implementing interface stubs automatically</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/10/87582.aspx</link><pubDate>Wed, 10 Mar 2004 23:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:87582</guid><dc:creator>shaykatc</dc:creator><slash:comments>16</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/87582.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=87582</wfw:commentRss><description>In Everett, we added a feature to add interface stubs to your code automatically, when you wanted to derive from an interface. To do this simply type out &amp;#8220;:&amp;#8221; after your class name, type your interface to derive from and you should see a little tooltip pop up that says &amp;#8220;Press TAB to implement stubs for interface Ifoo&amp;#8221;. Hit Tab and enjoy VS putting in the stubs for you. If you happen to delete the interface and retype a newer one, you might not see the tooltip again. To get it, erase all the way to the &amp;#8220;:&amp;#8221;. Enjoy...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=87582" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #6: Keyboard shortcuts</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/04/83993.aspx</link><pubDate>Thu, 04 Mar 2004 19:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:83993</guid><dc:creator>shaykatc</dc:creator><slash:comments>28</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/83993.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=83993</wfw:commentRss><description>&lt;P&gt;I'm a keyboard shortcut junkie. I love keyboard shortcuts for tasks. I've been known when speaking to devs to say stuff like &amp;#8220;Ctrl+alt+l, Select foo.cpp, Ctrl+alt_w+1...no, hit Ctrl+alt...&amp;#8221; instead of &amp;#8220; Open the solution explorer, select Foo.cpp, open a watch window...&amp;#8221;. A while ago I saw a post where &lt;A href="http://weblogs.asp.net/jamauss/"&gt;Jason Mauss&lt;/A&gt; asked for the keyboard shortcuts to VS. &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;These are online on MSDN at: &lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfvisualstudio70defaultshortcutkeys.asp"&gt;&lt;U&gt;&lt;FONT color=#0000ff size=2&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfvisualstudio70defaultshortcutkeys.asp&lt;/U&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;Or you can see them in VS 2003 documentation at: ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vsintro7/html/vxurfvisualstudio70defaultshortcutkeys.htm &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;However, there are some that I find so useful that I thought I would call them out here (note I tend to use the Visual Studio developer profile in Everett. You can change this from Help-&amp;gt;Show Start Page and then pick the My Profile tab):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Word wrap. &lt;/STRONG&gt;I hate scrolling across the screen to see a really long line of code. Hit Ctrl+R, Ctrl+R instead. Voila - instant word wrap. Hit it again to unwrap. This also works in the output window. 
&lt;LI&gt;&lt;STRONG&gt;Copy and then cut the current line of code. &lt;/STRONG&gt;Oftentimes, you want to move the current line of code you are working on a couple of lines down. Hit Ctrl+C, C. That copies the current line. Hit Ctrl+L to delete the current line of code. Move your cursor down and hit Ctrl+V. That should paste your original line of code. 
&lt;LI&gt;&lt;STRONG&gt;After a build failure hit F8. &amp;nbsp;&lt;/STRONG&gt;F8 takes you through your errors one by one, and highlights them in the code and puts the message in the status bar at the bottom of VS. 
&lt;LI&gt;&lt;STRONG&gt;Comment and uncomment code quickly. &lt;/STRONG&gt;Select your code. Hit Ctrl+K, Ctrl+C. Automatically commented. Select again. Hit Ctrl+K, Ctrl+U. Uncommented. 
&lt;LI&gt;&lt;STRONG&gt;Auto formatting. &lt;/STRONG&gt;Select your code, or hit Ctrl+A if you are lazy like me. Hit Ctrl+K, Ctrl+F. Code is formatted. 
&lt;LI&gt;&lt;STRONG&gt;Incremental search. &lt;/STRONG&gt;I live by this. Hit Ctrl+I and start typing out the word you want to find in the current file. The IDE then matches the word that you've typed. Hit Ctrl+I repeatedly to find the next occurence of that file. Hit Ctrl+Shift+I to go back. 
&lt;LI&gt;&lt;STRONG&gt;Get Intellisense. &lt;/STRONG&gt;Hit Ctrl+Space in your class etc, and you should get an intellisense dropdown that you can complete on. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Got a cool shortcut that you use frequently? Let me know. Spread the love.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=83993" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #5: Intellisense in the immediate window</title><link>http://blogs.msdn.com/shaykatc/archive/2004/03/01/82455.aspx</link><pubDate>Tue, 02 Mar 2004 06:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:82455</guid><dc:creator>shaykatc</dc:creator><slash:comments>27</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/82455.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=82455</wfw:commentRss><description>&lt;P&gt;Ok, one other new feature we added was to add intellisense to the immediate window.&lt;/P&gt;
&lt;P&gt;The immediate window is a window used to evaluate expressions, much like the VB6 one. When debugging and in break mode, you can open it up from Debug-&amp;gt;Windows-&amp;gt;Immediate. Then type in the expression you need evaluated and voil&amp;#224;, it returns values. Ok, one of the big changes in Everett was that we added intellisense dropdowns to the immediate window so you could just type for e.g. this. and then get a nice dropdown to see the members on the object. So you don't have to type into the watch window to see evaluations, or mistype into it by mistake.&lt;/P&gt;
&lt;P&gt;Which brings me to another feedback point. How important is this to you, Mr. C# Developer? VB.NET was the primary customer for this feature in VS2003 - do you happen to use this also? Anyone? Let us know. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=82455" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item><item><title>VS 2003 Tip #4: Demo better with the toolbox and task list</title><link>http://blogs.msdn.com/shaykatc/archive/2004/02/27/81117.aspx</link><pubDate>Fri, 27 Feb 2004 17:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:81117</guid><dc:creator>shaykatc</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/shaykatc/comments/81117.aspx</comments><wfw:commentRss>http://blogs.msdn.com/shaykatc/commentrss.aspx?PostID=81117</wfw:commentRss><description>&lt;P&gt;Two quick simple techniques for people who need to demo code (as I wait for the traffic in front of my house to recede before getting to work).&lt;/P&gt;
&lt;P&gt;Oftentimes, you want to demo some code quickly to people and don't want to type it all in. The Toolbox window is very handy for this. Highlight a bunch of code and drag and drop it to the Toolbox window (View-&amp;gt;Toolbox). On my machine I generally put this in the General tab on the Toolbox, but you can put it in the User controls tab too. Now when you are demo'ing and need some quick code, just drag and drop it from the Toolbox where you had it previously stored.&lt;/P&gt;
&lt;P&gt;Another cool demo tip I've picked up here, is to use the task list. The task list in C# will show you comments for tokens you specify. So lets say you want to demo some feature in File1.cs line 30 and then in File2.cs at line 40. You can navigate back and forth easily using the task list. &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go to Tools-&amp;gt;Options-&amp;gt;Environment-&amp;gt;Task List and type in &amp;#8220;Demo&amp;#8221;&amp;nbsp;in the Name textbox. Click Add. &lt;/LI&gt;
&lt;LI&gt;Now go to those files locations you want to demo with and add some comments prefixed with Demo like &amp;#8220;//DEMO:Show rapid prototyping here&amp;#8221;. &lt;/LI&gt;
&lt;LI&gt;Open your task list and right click on your description pane - make sure the Show Tasks option is selected as &amp;#8220;All&amp;#8221; or &amp;#8220;Comments&amp;#8221;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;You should now see the task list automatically populate with your comment. Now when doing a demo, you can just open the task list and click to that code block that you want to show.&lt;/P&gt;
&lt;P&gt;Now to fight the traffic...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=81117" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/shaykatc/archive/tags/Visual+Studio+2003+Tips/default.aspx">Visual Studio 2003 Tips</category></item></channel></rss>