Visual Studio Code Breakpoint warning: The source code is different from the original version

This happened to me when I upgraded my project from .NET Core 2.0 to 2.1. The problem was that I forgot to edit launch.json to change the binary path from netcoreapp2.0 to netcoreapp2.1 so VS Code was looking for binaries in the wrong place. Editing the path fixed the problem.


This could happen for several reasons, in my case it was a simple/dumb mistake, I created a solution in my main folder, then I added a new folder and created a webapp in it. I configured launch.json and task.json and it worked fine until I tried to debug a modification.

My problem was that I forgot to add the webapp project to the solution, so it failed when the solution tried to build it.

So the solution for me was to add my project to the solution.

If this is not your case try to figure out why your project is not being built, or why it is pointing to other directory.