Breakpoints not pausing program on certain lines.

For context, the code I’m writing is in a game plugin. And I’m using Jetbrains Rider.

Breakpoints aren’t working on certain lines in my code. For example, I have a simple function call with a breakpoint set which pauses the program correctly, and within that function I’ve also set breakpoints at different lines, which do not pause the program for some reason, but do get executed.

Examples:
This method call works fine.

Code inside the method gets executed but not pausing at breakpoints.

This happens a lot lately, certain lines or functions just ignore the breakpoints for some reason while being executed correctly. This is very confusing and annoying since you expect there to be something wrong with the program since the breakpoints you’ve set are not being called. This makes you think there is something wrong with the code, even though its working fine.

afaik that usually means that those line were optimized away or there is no debug data by some other reasons. Also, if you try to f11(step into) such code - you won’t see its internals.

I think the best you can do is to keep that in mind and make sure you debugging in “DebugGame” configuration, not just in “Development”.

upd: @Melvin_Brink, recently i’ve found another major reason that can break debugging: Increase the Number of Modules Loaded When Attaching the Debugger

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.