Code Yarns β€πŸ‘¨β€πŸ’»
Tech Blog ❖ Personal Blog

Visual Studio as a Code Browser

πŸ“… 2012-Mar-01 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ visual studio ⬩ πŸ“š Archive

Visual Studio ships with excellent code-browsing capabilities.Β It can build Intellisense database for a large set of languages, including new ones like CUDA. There are toolbar buttons, right-click menu options and keyboard shortcuts to Navigate Forward, Navigate Back, Go to Definition, Go to Declaration and Find All References. These features are quite sufficient to browse through source code of large libraries (or even kernels) from open-source projects written in any of the supported languages.

To use Visual Studio as a code browser for the source code of some project:

  1. Create an empty Visual Studio solution.

  2. Place the directory containing the source files inside the directory of this solution.

  3. Add all the source files to this Visual Studio project. If the files are distributed in a tree of subdirectories, this can be hard. To add all of them in one simple step, see this post.

  4. Explore this code base and enjoy your weekend! 😊

Tried with: Visual Studio 2010 and Visual C++ 2010 Express