Freigeben über


Visual Studio 2005 As General Code Search Tool

Visual Studio 2005 has powerful search capabilities. One of my favorites is "Find in Files".

image

 

 

Just hit Ctrl+Shift+F (more shortcuts - My Favorite Shortcuts).

Essentially it uses FindStr utility that sits in System32 folder and comes for free with Windows OS. FindStr is a command line utility and those who like typing would prefer it, but those who like UI would go for Visual Studio. There is no need to open project - just fire up Visual Studio and hit Ctrl+Shift+F.

I discussed different searching options I practice here - Security Code Inspection - Eternal Search For SQL Injection , but I thought FindStr and its utilization in Visual Studio deserves special attention.

The best part I like is that after hitting "Find All" button I am presented with list of all files that matched the search criteria and the match itself, so I can quickly evaluate what I got in my net. Once I smell something fishy I hit the file and it opens in the very same Visual Studio for detailed inspection. I think it is very handy.

 

 Enjoy.

Comments

  • Anonymous
    June 05, 2007
    The comment has been removed
  • Anonymous
    June 05, 2007
    The comment has been removed
  • Anonymous
    June 06, 2007
    I have been using VS all day long for years, and I did not know this.  Great tip!
  • Anonymous
    June 06, 2007
    BEM, Happy it was helpful for you!!Have you sen what ILDASM, FindStr, and Outlook can do for you w/r to search?Check out "Security .Net Code Inspection Using Outlook 2007" link under Popular on the side barEnjoy:)
  • Anonymous
    January 24, 2008
    How to streamline the process of capturing security flaws during security code review? How to save time
  • Anonymous
    March 17, 2008
    Want to quickly check your ASP.NET Web application for Cross Site Scripting (XSS) vulnerability ? It
  • Anonymous
    July 24, 2008
    "The hardest thing of all is to find a black cat in a dark room, especially if there is no cat."