Recently, I’v been working on a project using vs2010, my solution contains 2 projects, one of them compiles a dll, the other is a testing project. Everything is fine during my testing and debugging, but out of no where I can’t set any breakpoint in the dll project, vs2010 tells me that: “This Breakpoint Will Not Currently Be Hit, The Source Code is Different from the Original”. I immediatly clean and rebuild the entire solution, of course not working, still cannot hit the breakpoint. Then I google it for a while, there are serval solutions:

  • Clean and rebuild, apparently not working
  • Uncheck the “Require source files to exatly match the original version” in Option->Debugging->General, this works, but I thinks uncheck this option well cause some problem in other projects, so I didn’t choose this
  • Some people sugguest to change platform and rebuild(such as change anycpu to x86), still not working

And these are the most sugguested ways to solve this problem, but either not working or has some risks. Then I get mad… Luckily I had a backup programm, which is fine when debugging. So I just replace the code with my new one, bang, this fucking problem appeares again…

Then I started to suspect that maybe the code has something wrong, I baidu(yes, baidu, not google…) this problem, and magically get the solution, it seems that I had to add a comment that has chinese characters in it at the first line of the code page, this successfully solve this problem even though I dont’t know why…

And wait, why I’m crazy when the problem is solved? Because this problem occurs again next day, I swear to god I din’t change any thing, and that’s why I’m crazy and types these nonsense words… Fuck visual studio!


Comments