VC debugging cannot go to the breakpoint solution.
Favorites
I have encountered the same problem before, but I did not ask why or find out why. Debug a DLL yesterday and add the output information. It is too troublesome and difficult to locate. However, after the breakpoint is set, press "F5". When the breakpoint is unavailable, the bubble prompts "the current breakpoint is not hit, no symbols have been loaded for this document." Right-click and choose "location"> "allow source code to be different from the original version. 77777 I still don't believe it!
Later, we found that the DLL has been provided under the EXE Path entered in "Alt + F7"-> "configuration properties"-> "debug"-> "command, we didn't call the DLL started by F5 at all ...... Copy the EXE (and other related files, if any) to the dll Directory and debug it.
I made a low-level mistake. However, it also summarizes the possible causes for debugging failure:
1. the solution configuration is debug, however, the project properties page does not contain "Alt + F7"-> "configuration properties"-> "C/C ++"-> "general"-> "debugging information format ", select "program database for" edit and continue "(/Zi )". In addition, choose "configuration properties"> "linker"> "debugging"> "generate debugging information" and select "yes ".
2. The solution configuration is release. You can debug it directly using F5. Vs will prompt you "no debugging information found. Do you want to continue debugging ?", Select "yes.
3. Check whether the project path contains Chinese characters. If vs does not support Chinese characters, see http://blog.csdn.net/red_hope/archive/2007/10/20/1833916.aspx ).
4. Delete. NCB,. Opt, and rebuild all.
5. Check whether the file contains: "Warning c4819: This file contains characters that cannot be expressed in the current Code Page (936. Please save the file as Unicode to prevent data loss. "warning: Open the CPP file in notepad, save it as Unicode, and re-compile the file. (Refer to the http://www.cppblog.com/qiujian5628/archive/2008/04/11/41806.html vs2005 strange breakpoint invalid problem)
6. Tools-> options-> debugging-> General, you can deselect the check box that "requires that the source file exactly match the original version!
Oh, that's all for the time being. Please add it to me :)
This is another article on cppblog:
In the most recent project, when debugging, some CPP files can set breakpoints and follow them in. However, a CPP file cannot always set breakpoints, prompting "the current breakpoint is not hit. The source code is different from the original version ." After changing the file n times, it does not work. Then, search for similar issues in Goole and find the next article. Then, I open the CPP file in notepad, save it as unicode format, and re-compile the file, finally, solve the problem! You can also change the settings of vs2005, option-> General. You can cancel the check that the source file exactly matches the original version!
Clear the entire solution and recompile it. Delete the entire directory and go down from the Subversion server and try again. Search online. Let go.
Fix a bug, submit it, update it, compile and run it, and find that I am also infected with this problem-only that file cannot insert breakpoints. It seems that it is not a VC bug, but a source code issue. Roll back the file to the version before the update. Update to the next version. Check the changes. An uncommon warning was reported:"Warning c4819: The file contains characters that cannot be expressed in the current Code Page (936. Save the file as Unicode to prevent data loss.". Oh, it should be it.
There are two warnings. One is for a file without a line number and the other is for a line number. That line is a case statement, followed by a Chinese comment. Delete comments and solve the problem. Copy the code to ultraedit to check the hexadecimal code, and filter the byte one by one. Nothing strange was found. Then, gradually approach the problem, remove the Chinese characters before and after the annotation until the problem disappears, and then search for the word "instant message" as the core word, there is only one project. Add or delete a space before the word, and the problem disappears. It is depressing that copying the same line of code to other files and locations will not cause this problem.
Recover all changes and update them to the latest version. The problem changes again: there is only one warning and no row number! Use the insert Space Method to locate the problem and find that the error is moved forward several lines. Even if the warning is cleared this time, the breakpoint cannot be added. After trying for a while, there was no effect. I simply used VC to format the entire file once, And the breakpoint was ready for use again. Moreover, no c4819 is available for inserting spaces this time. Compared with the files before and after the modification, there is still no discovery.
After searching, other people have encountered c4819, some of which are caused by UNIX line feed format and even a non-ASCII author name in the boost library, however, this should be the problem of Chinese Double Byte Character misplacement. As the warning level reaches 4, various warnings are flooded, and they are not handled in a timely manner. This warning is drowned in the warning heap ......
There are also:
I have also encountered the same problem, and the breakpoint cannot be followed up. The solution is to add MessageBox before the breakpoint. The principle is unknown.
Or right-click the call stack to set the call breakpoint location. For details, see: How to: edit the breakpoint location.