I had all the same problems with "This is not a valid place for a breakpoint", and I also did not have code highlighting or intellisense on any of the Razor code. None of the solutions I could find resolved. First of all, because my problem was caused by a very stupid observation on my part, but just in case someone was here and made the same mistake, I thought I would share it.
If you have not physically created the view in Visual Studio, for example, if it was created with the NuGet package (Umbraco in my case), or if you opened an existing solution that does not belong to you ... The view may not be included in the project. You can see something like this 
Please note that the Homepage.cshtml file is located there, and I can edit, compile, display it, etc. But I could not insert a breakpoint anywhere. Right-clicking on the file and selecting "Include in Project" was a fix for me.
hardba11
source share