I'm stepping through my C# program in Visual Studio, trying to test how a generated HTML string will look given a few modifications. After I pause the debugger, modify my code, then continue, the changes do not take effect. I step through the entire method and when I look at the generated HTML string, it's the same as it was before I modified it. The changes only take effect if I stop running the program and run it again, which is extremely tedious.
Is it caching in some way?
In fact, to use that function, every time put the cursor back to the changed part and then step over the cursor, it will take effect.
So please try these suggestions:
Suggestion
1) make sure that these settings are checked under
Tools-->Options-->Debugging-->Generaluncheck
Require source files to exactly match the original versionunderTools-->Options-->Debugging-->General.check
Managedand uncheckNativeunderTools-->Options-->Debugging-->Just In Time2) close VS Instance, delete
.vshidden folder,bin,objfolder and then restart your project again.3) If you port an existing project, you should specify
EmbedInteropTypesasfalse.Add it in
xxxx.csprojfile.4) disable any third party extensions under
Extensions-->Manage Extension5) make sure that you use the Debug mode
If your project is created by an old VS version, try to create a new project in VS2017 and then migrate the content of the old project into the new project to test this. (Not sure if the project is created by an old VS version)
Note that in different versions of vs, they can be some different, and if it is an old project, it may have some problems with this function in VS2017.
Hope it could help you.