1

I want to use Visual Studio C++ to debug an existing project, but without generating additional files within the project itself.

How can I tell visual C++ 2008 to put its own stuff in a separate directory outside the project?

3 Answers 3

4

Short answer: You can't.

When you attach the debugger to an executable, VS2008 will insist on generating a "solution" file, even if you click on the "No" button of the Save solution button. This can be most annoying, having to delete these files stored in the executable's directory.

However, if you debug the same executable more than once, this can actually be pretty useful for saving debug settings, such a breakpoints, across debug sessions.

2

See if can you set the whole project up in the "separate directory outside the project", and save the useful files somewhere else.
Add Existing Item [Shift+Alt+A] springs to mind, along with changing output directory:

  1. Right-click project in Solution Explorer
  2. Properties
  3. Configuration Properties
  4. Output Directory.

I'm on version 2010 Express, so check before following my advice.

1

a couple of options:

  • make a copy of the project and then do your thing at the copy
  • get mercurial / git, put the original files under version control and then do your thing
  • build a new buildsystem (cmake comes to mind) which allows you to separate source files from created files

You must log in to answer this question.