0

I get this message when I try to attach the debugger to a staging publish in Visual Studio:

enter image description here

As you can see here, it is set to debug mode: enter image description here enter image description here

I disabled "Just My Code":

enter image description here

I also tried ticking this box:

enter image description here

I still get the error message. I have tried cleaning and rebuilding.

Questioner
  • 2,451
  • 4
  • 29
  • 50
  • 2
    Just because you set debug in your visual studio does not mean it was set on the machine that built the assembly you are attaching to. Check that debug is set in the web.config – Scott Chamberlain Jan 16 '17 at 14:37
  • @ScottChamberlain The only reference to the word 'debug' I see in Web.config is this: `` – Questioner Jan 16 '17 at 15:29
  • That is the correct setting. Check that the setting is in the remote version of web.config too, not just in your local copy. Also, perhaps you are stepping in to a external library that was not built with debugging enabled. Do you have any extra references in the project? What happens if you put a breakpoint in your code in a section you know will be hit and let the program continue. Lastly, can you include a screenshot of the "Modules" window while you have the debugger paused, try to include as many columns and rows as you can in the screenshot. – Scott Chamberlain Jan 16 '17 at 15:41
  • @Questioner, Do you debug a web app which was deployed to the IIS or others? Do you disable the "Optimize code" option in your project property, please also set the "Debug Info=Full", clean and rebuild the Whole Solution, check it again: http://stackoverflow.com/questions/810203/the-following-module-was-built-either-with-optimizations-enabled-or-without-debu – Jack Zhai Jan 17 '17 at 10:26
  • @Questioner, do you resolve this issue? Please feel free to let me know the latest information. – Jack Zhai Jan 27 '17 at 02:51
  • @JackZhai-MSFT The issue resolved itself. I no longer get the error so I can't see whether anything works to fix it. – Questioner Jan 30 '17 at 16:49

0 Answers0