I want to debug a built .exe project but breakpoints are not hit.
Unity version: 5.4.2f2
VSTU version:2.8.2.0 (latest)
Visual studio: 2015 Update 3
Windows 10 x64
Here are the build settings:

I did with x86_64 too. No difference.
A .pdb file is created for the player. I deleted it and after build it is created again so seems right.

When I execute 1.exe I go to DEBUG>Attach to process… and choose the 1.exe process, Then I click on ATTACH.
This is what happens:
The breakpoints are simply disregarded by VS. Also if you carefully take a look, I do a lot of #if UNITY_EDITOR for portions that should be excluded from build. This does not seem to be the reason because the same problem seem to exist in files that do not have this directive. Also if you look at the modules window in the screenshot it is evident that the .pdb file is actually loaded.
Another thing I’ve done is in the DEBUG>Attach to process… dialog I clicked on the SELECT button and chose Unity code. It made the breakpoints solid red again and the warnings went away. But the breakpoints are still not triggered even on codes that don’t have any compiler directives.
I also did reboot the computer:p. The project can be debugged without problem when run in editor. Only built player has this problem.
So I’m out of clue right now. Is there anything else worth of a try?


