views:

35

answers:

2

Within a Visual Studio (2005/2008) Project I'd like to use an open source library. I'd like to link to the binaries so that I'm not responsible for a proper build and can check those binaries into the source control server (SVN).

So far so good, but if I'd like to debug into the open source library or want to take a look at a class implementation I would be forced to add the the source of the project into my solution and than link my project to the source instead of the binaries.

Is it possible to tell Visual Studio a location of the source of a linked binary library so that things like "go to definition" and debug is working?

+2  A: 

Absolutely, if you have the pdb symbols its all done for you - look at MFC for example, you get the binaries yet can debug through the source.

If you don't have the symbols, then its a lot more complicated, when you debug through the code it may ask you to show it the source lines, and you'll just have to find them for it (usually the path is the same so its easy).

gbjbaanb
Thanks .. but this only helps for debugging. I'm still getting the meta informations of the binary library instead of the source code if I click "Go to Definition" inside the editor.
Martin
A: 

There are multiple ways you can achieve this.

  1. Like gbjbaanb suggested you can use pdb symbols. It's going to work for both managed an unmanaged code.

  2. If you're using .NET you can debug with Reflector. Oran Dennison wrote how to debug with Reflector and Visual Studio. One of my favorite tools is TestDriven.NET. Author of this tool, Jamie Cansale, also blogged about how to debug with Reflector when you have TestDriven.NET. In his article, Jamie has a link to screencast where he demonstrates how to do it step by step.

  3. Last, if you use for your SVN client like TortoiseSVN, you can add files/directories from check in. More details how to Ignore Files and Directories with TortoiseSVN.

Vadim