none
Visual Studio no longer asks if I want to compile edited files when running debugger

    Question

  • Hello, I'm running Visual Studio 2015 on Windows 7 (64 bit).  Previously, there would always be a message box if the project had been edited and not saved before running under the debugger.  I like it to do that, but haven't found where the option is.  I would like to edit a file, then click on "Local Windows Debugger" and have it ask me if I want to save and compile edited files. Now it just runs the latest compiled executable without the changes I've made. The good news is that it still automatically saves unsaved edited project files when I run it under the debugger.  It also doesn't warn after the file has been saved.  Now I have to remember to compile after editing and find out that I haven't when a breakpoint doesn't work.  How do I get the warning back?  (Using Visual C++).
    Monday, August 6, 2018 6:30 PM

Answers

  • That appears to be the problem: the Build box in Solution properties was not checked.  Not only did it fix this problem, it also fixed another problem: not retaining the x64 project platform setting in the Configuation manager which I brought up the Visual Studio forum.  (I will go over there and report the problem solved.)  Many, many thanks!
    • Marked as answer by garyflet0 Tuesday, August 7, 2018 4:03 PM
    Tuesday, August 7, 2018 4:03 PM

All replies

  • Options for 'Build and Run' you may find under Tools->Options...

    With kind regards


    Monday, August 6, 2018 7:00 PM
  • Check your setting for VS2015 Options at -

    Monday, August 6, 2018 7:04 PM
  • Thanks for the replies.  Now I at least know where the option is.  Unfortunately, changing the option doesn't fix the problem.  Here's the sequence.  I have the option as described above on "Prompt to Build".  I edit a file in the project (a file listed in the Solution as a Source File) by adding an empty line.  An asterisk appears next to the file name, indicating that it has been editing.  Then I click on "Local Windows Debugger".  Then the program runs without prompting or building.  However, the file is saved and the asterisk disappears.  If I then click to build the project the output reports the build and lists the file that I edited as the one it is compiling.

    The same thing happens if I select "Always build".  The option appears to be ignored and VS has settled on "Never build".  The trouble is, because it doesn't build, if I don't remember to build it, my breakpoints don't work.  (Although in the past some projects would prompt even though there wasn't a file that needed compiling.  It's gone from prompting too much to not prompting at all.  I'd rather have the prompting too much.)

    Monday, August 6, 2018 8:08 PM
  • Just to exclude: can you verify in 'Solution properties' that 'Build' is checked?

    With kind regards

    Monday, August 6, 2018 8:42 PM
  • That appears to be the problem: the Build box in Solution properties was not checked.  Not only did it fix this problem, it also fixed another problem: not retaining the x64 project platform setting in the Configuation manager which I brought up the Visual Studio forum.  (I will go over there and report the problem solved.)  Many, many thanks!
    • Marked as answer by garyflet0 Tuesday, August 7, 2018 4:03 PM
    Tuesday, August 7, 2018 4:03 PM