2
votes

I have a breakpoint set in a method and once I made changes to the code it stopped from being hit and the breakpoint displayed as below.

enter image description here

I referred this question and this question but none of them helped. But when I close the visual studio and open again my new code changes will be hit. I am aware that I can disable Require source file to exactly match the original version like below.

enter image description here

when i do that it will hit the breakpoint but the new lines of code will not be executed instead debugger will only step in to the old lines of code.

I want to know how can i save and debug the changes I did without having to re-launch vs2013 everytime I did a modification in the code. Any help is much appreciated.

1

1 Answers

0
votes

To make sure I understand, in your case the issue is that the old version of the code is executing. Correct?

If so, when you pressed F5, what happened --

  1. Project didn't attempt to build

  2. Project attempted to build, but Visual Studio decided your project was already up to date, so nothing actually built

  3. Project was fully built but, somehow didn't get deployed

If you are in state 1: go to Tools->Options->Projects and Solutions->Build and Run. Make sure the top two options ('On Run, when projects are out date' and 'On Run, when build or deployment errors occur') and in a reasonable state (NOT 'never build' or 'Launch old version').

If you are in state 2: this means that that incremental build didn't detect that your project is out of date. You can turn on verbose build info in Tools->Options->Projects and Solutions->Build and Run, which might help troubleshoot.

If you are in state 3: what type of project do you have?