Community
    • Login

    Breakpoints disabled in release mode

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 3 Posters 548 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Alan KilbornA
      Alan Kilborn
      last edited by Alan Kilborn

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

      03579f04-2457-4cb0-acd9-f7fe0de91ea8-image.png

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

      f48694ba-799f-4007-bc70-8e7d22aa48d3-image.png

      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…

      PeterJonesP CoisesC 2 Replies Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @Alan Kilborn
        last edited by

        @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).

        1 Reply Last reply Reply Quote 1
        • CoisesC
          Coises @Alan Kilborn
          last edited by

          @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.

          1 Reply Last reply Reply Quote 4
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors