title: "One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program."
body: <p>I set a breakpoint in my code in Visual-C++, but when I run, I see the error mentioned in the title.</p>
  
  <p>I know this question has been asked before on Stack Overflow (<a href="https://stackoverflow.com/questions/657470/breakpoints-cannot-be-set-and-have-been-disabled-problem">Breakpoints cannot be set and have been disabled</a>), but none of the answers there fully explained the problem I'm seeing. The closest I can see is something about the linker, but I don't understand that - so if someone could explain in more detail that would be great.</p>
  
  <p>In my case, I have 2 projects in Visual C++ - the production dsw, and the test code dsw. I have loaded and rebuilt both dsws in debug mode. I want a breakpoint in the production code, which is run via the test scripts. My issue is I get the error message when I run the test code, because the break point is in the production code, which isn't loaded up when the test starts.</p>
  
  <p>Near the beginning of the test script there is a mytest_initialize() command. I imagine this goes off and loads up the production dll. Once this line has executed, I can put the breakpoint in my production code and run until I hit it. But it's quite annoying to have to run to this line, set the breakpoint and continue every time I want to run the test.</p>
  
  <p>So I think the problem is Visual C++ doesn't realise the two projects are related. Is this a linker issue? What does the linker do and what settings should I change to make this work?</p>
  
  <p>Thanks in advance. Apologies if instead I should be appending this question to the existing one, this is my first post so not quite sure how this should work.</p>
  
  <p>[Update 1] I think Chris O has identified the problem. I'll add a further update if I'm able to work out how to use the project settings to make this work.</p>