Shaykatc's WebLog

VS 2003 Tip #14: Impress your friends with these two arcane tips :-)

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:-)

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.

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!

 

Published Friday, April 16, 2004 9:54 AM by shaykatc

Comments

 

fryguybob said:

In VS6 I was able to do the block selection from the keyboard by pressing alt-f8. The keyboard initiation seems to be missing in VS.NET 2003 =(.
April 16, 2004 10:03 AM
 

Scott Allen said:

Just don't hit the "untabify" command in a block selection!
http://odetocode.com/Blogs/scott/archive/2004/03/21/202.aspx
April 16, 2004 11:02 AM
 

Gunnar Kudrjavets said:

April 16, 2004 2:10 PM
 

Ziv Caspi said:

I've often wondered how to do the equivalent of "windbg -pn ProcessName" in VS.NET. Is it possible?
April 19, 2004 6:53 AM
 

Shaykatc s WebLog VS 2003 Tip 14 Impress your friends with these | internet marketing tools said:

June 16, 2009 1:27 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker