Alik Levin's

Clarity, Technology, and Solving Problems | PracticeThis.com

Visual Studio 2005 As General Code Search Tool

Visual Studio 2005 As General Code Search Tool

  • Comments 7

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.

  • Search (& replace) in vs2005 is the bomb, as a programmer that's one leg in Microsoft space and one leg outside, I'm keeping VS opened all day for uses such as this.

    VS has another advantage, and that's in opening and handling HUGE text files.

    Cheers,

    Daniel.

  • "The Bomb" - i guess is good in this context :).

    All credits go to FindStr utility - Visual Studio is just fancy UI w/r to search in files capability.

  • I have been using VS all day long for years, and I did not know this.  Great tip!

  • 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 bar

    Enjoy

    :)

  • How to streamline the process of capturing security flaws during security code review? How to save time

  • Want to quickly check your ASP.NET Web application for Cross Site Scripting (XSS) vulnerability ? It

  • "The hardest thing of all is to find a black cat in a dark room, especially if there is no cat."

Page 1 of 1 (7 items)