0

As you can see in this screenshot, the breakpoint at line "Debug.Assert(modIO.FileExists(uPath)) disappears as soon as I hit "Debug".

Once I quit debugging, the breakpoint appears again.

enter image description here

Does anybody know why this might be happening?

Cleaning or rebuilding doesn't help.

Also, in some places, I set it at a line containing "Debug.Assert(...)", and when I hit "Run", the breakpoint is set to the line below this line.

Thank you.

tmighty
  • 10,734
  • 21
  • 104
  • 218
  • I think this is related to your question. Although the post is regarding `WITH` clause. https://stackoverflow.com/questions/15256776/is-there-a-way-to-debug-vb-net-with-clause-in-visual-studio – Aethan Aug 26 '16 at 06:40
  • No, it also appears without the WITH clause, but thank you anyways. – tmighty Aug 26 '16 at 07:11
  • Crystal ball says that you are debugging code that was compiled without DEBUG in effect. Perhaps the Release build. So the first breakpoint cannot work, the Debug.Assert() call produced no code. The debugger moves the breakpoint when you start debugging to the next statement that *does* produce code. Your Using statement has two breakpoints, not otherwise easy to see. – Hans Passant Aug 26 '16 at 07:26
  • It's a duplicate of http://stackoverflow.com/questions/2155930/fixing-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-fo The solution "make sure [Define DEBUG constant] and [Define TRACE constant] are checked" fixed it for me. – tmighty Aug 26 '16 at 12:18

0 Answers0