I’m converting an old VB6 desktop application to vb.net, starting with 2008 and now migrating to 2012 (express version). It’s been a slog but I’m well through it. Now I have run into a problem that I don’t know how to solve. All of a sudden the breakpoint marker is hollow and hovering the cursor over it gives the message “The breakpoint will not currently be hit. The source code is different from the original version. To allow the breakpoint to be hit when the source code is different, right click on the breakpoint, choose ‘Location…’, and turn on ‘Allow the source code to be different from the original version’. To allow this for all breakpoints, disable the option ‘Require source files to exactly match the original version’ under Tools, Options, Debugging, General”.
I tried this and the breakpoint went solid again but there’s still no code there to execute, so that doesn’t work for me.
It’s apparent that something changed in my configuration or output files that makes the source code and object code different. But what?
This problem has been posted time and again, and I’ve researched it, but there doesn’t seem to be just one cause or just one solution. I tried the following: cleaned the solution and rebuilt, deleted the /bin and /obj directories and rebuilt, checked to make sure the configuration is set for ‘debug’ and ‘any CPU’, cleared the debug symbol cache, switched on and off the Microsoft Symbols Server, added a symbols pointer to the projects’s debug directory (in Tools.Options.Debugging.Symbols), checked/unchecked “Enable Just My Code”, and deleted and restored from backup the particular form and code that I’m working on. The latter attempt actually worked for me until I tried to change code and again got the dreaded hollow breakpoint. I also tried removing and reopening the entire project anew but VS recognized it and restored it back to what it last was. I’m to the point where I’m considering reinstalling VS2012 but will check here for any advice before I try that. It’s not as simple as it sounds because there’re so many part to it, I’d rather avoid it.
Thanks for any ideas….