在運(yùn)行前用F9設(shè)置了斷點(diǎn),但是運(yùn)行后,那個(gè)斷點(diǎn)卻變成了空心圓和黃色感嘆號(hào)標(biāo)志。
鼠標(biāo)放到失效斷點(diǎn)上,會(huì)彈出一些英文,告訴你如果解決這個(gè)問(wèn)題:
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.
我們這里直接點(diǎn)擊失效斷點(diǎn)的右鍵菜單選“location”,在Allow the source code to be different from the original version.的方框上
點(diǎn)擊一下,添加個(gè)勾就行。
在運(yùn)行至斷點(diǎn)處時(shí)會(huì)提示“The source file is different from when the module was built.Would you like the
debugger to use it anyway?”,選下面的“是(Y)"按鈕就可以了,程序會(huì)跳到斷點(diǎn)處。