Breakpoints with warnings (can't reach code) and wrong step by step debugging

This is something that I have been fighting for a long time.

And solutions to this in the Visual studio communities don’t work here. Probably because of the Unity relationship.

You place a breakpoint on the code.
It sometimes becomes or directly has a warning.

image

It says that:

THe breakpoint will not be hit. Couldn’t find a corresponding position.

So when executing step by step, it stops in the right good one but jumps over the warning one as expected, but the step by step stops in weird lines, skips some, and if it is a function call, even though the text shows something, what is executed is the code in an offset before or after! As if lines of code were missing.

Reasons why from the VS community: Debug info is old. Generating it again fixes the prob. Clean project, and Rebuild after cleaning /obj and other remporary folders of generated stuff.

That works on c++ or c# projects. But this is no typical project. In fact we can’t Clean. The option is disabled for Unity projs. I wonder if Rebuild would do the same in this case (in c++ it does).

I restart VS and Unity, delete all project files and .vs/ files and regenerate them, disable Preferences → Jobs → Use Threads . And Jobs → Burst Compilation.
Either of those fixes the problem.

What do we do? This is making it absolutely impossible to debug normal code!