One way for VC to debug a program is to track the function and check whether the function is executed according to the logic. This can be achieved by setting a breakpoint at the function call and using the step into (F11 as the function shortcut key) function after the interruption. However, sometimes after you press F11, the "please enter the path for a source file" dialog box appears. If you choose Cancel, you enter the assembly mode, which is generally not what we want.
To solve this problem, you need to classify the source files as required. If the source files come with VC, such as atox. c, printf. c, assert. C and so on, all belong to the scope of the C Runtime Library. In this case, select the source folder of the C Runtime library under the VC installation directory, which is usually:
C:/program files/Microsoft Visual Studio/vc98/CRT/src
If you are prompted that the file cannot be found, find the installation disk of VC and copy all the files in vc98/CRT/src to C: /program files/Microsoft Visual Studio/vc98/CRT/src.
If it is not the source file that comes with VC, you have to find a solution.
Note: The main driver for writing this article is that I found many incorrect answers to this question on the Internet, which will mislead you. For example, Baidu knows:
Problem: When you use VC ++ to debug the program step by step, you must select the path please enter the path for printf. C.
Baidu's best answer: You have used F11 (step into) to follow up. In this case, the library function will encounter such a problem, because the library function already exists in the Lib file,Printf. cOf course, such source code files are gone (this sentence is very misleading to everyone !)We recommend that you use F10 to skip the library function.
Q: Why does the please enter the path for... Dialog Box always appear when I press F11 in VC ++ 6?
Baidu's best answer: those library functions that come with C ++, such as printf and memset, you 'd better skip F10,F11This is the case (this sentence is very misleading !)