Breakpoints disabled in release mode
-
Using Visual Studio 2022 on Notepad++ code, I get the situation when I run the code that any breakpoints I’ve set are disabled:

Note that this is “Release” mode. If I change to “Debug” mode, the breakpoints remain enabled (and are indeed hit at the right time):

In troubleshooting for Release mode running, I see that “No Symbols have been loaded for this document”. This can make sense for a Release mode build, but the thing is, I’m pretty sure that a while ago I could set and hit breakpoints in this mode – has someone changed this attribute of the build?
I’d run in Debug build mode, but there are some assertions that fire when I have certain data in a Scintilla editing window, and these “get in the way” of what I’m trying to debug. (Sure, someone should go in an fix the code for this, and/or clean up the assertions if they are invalid). I could “comment out” said assertions, but this got just annoying enough that I thought I’d bother to create this thread here…
-
@Alan-Kilborn said in Breakpoints disabled in release mode:
but the thing is, I’m pretty sure that a while ago I could set and hit breakpoints in this mode
Not having compiled/debugged N++ source, I cannot answer for the specifics, or whether there’s a way to fix it in the project settings.
But at work on our VS-based projects, I have definitely seen that if I don’t remember to recompile in debug-enabled mode, it will skip breakpoints (it’s more confusing at work, because the behind-the-scenes automation hides from us whether it’s the “Debug” target or “Release” target because both must build to the same location, and whichever was built last overwrites the other).
-
@Alan-Kilborn said in Breakpoints disabled in release mode:
I’d run in Debug build mode, but there are some assertions that fire when I have certain data in a Scintilla editing window, and these “get in the way” of what I’m trying to debug.
If you right-click the Notepad++ project in the Solution Explorer pane and select Properties, under Linker there is a Debugging page. Select the Release configuration and change Generate Debug Info to “Generate Debug Information (/DEBUG)”; that should let you compile as for release, but with symbols. Just remember not to commit the changes to the .sln file.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login