19 Eylül 2019 Perşembe

The breakpoint will not currently be hit. The source code is different from the original version.




'The breakpoint will not currently be hit. The source code is different from the original version.'

This error mostly is appearing due to unclear reasons while working on the solution with multi-project on visual studio.

When you put a breakpoint for a line it doesn't work what you expect. It skips over the line you need to observe. It doesn't stop on the line and breakpoint's color(redpoint) turns to yellow. Then the tooltip which starts to appear when you mouse over the yellow dot breaking point.

Consequently, your breakpoints don't be hit when they are required to work. And they never will be hit.


In my solution, there are 3 projects called ArarGameLibrary, PuzzleMeWindowsProject, TestProject.Suddenly the error started to appear when I was working on PuzzleMeWindowsProject which uses ArarGameLibrary.dll.Writing code withoud debugging is a complete disaster.
I found some solutions on the web but they don't give a real solution us to keep going on.

I tried 3 ways. Firstly do 'Clean and Rebuild' PuzzleMeWindowsProject project. It won't work forever.

Secondly, in the top menu of Visual Studio,Uncheck Tools/Options/Debugging/General/
'Require source files to exactly match the original version'.It won't work forever.Actually a breakpoint will not work even where it should work.



As the third way, inside bin/debug files of the project remove files with pdb extension.Unfortunately it does'nt solve the problem too.

Anyway, you don't have to do one of them.

There is a configuration manager, where there is a debug drop-down list at the top of the visual studio



Inside the Configuration Manager you need to configure your debug build for your project.I select all my projects to build in my debug configuration as you see below.


As a result my projects will be build when I click to debug.Everybody is happy now? Thank you.





Hiç yorum yok:

Yorum Gönder