Community
    • Login

    Search in target is sometimes failing

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    46 Posts 3 Posters 11.3k 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.
    • Peter GoddardP Offline
      Peter Goddard @Ekopalypse
      last edited by Peter Goddard

      @Ekopalypse Of course, my code works, until it breaks liked we talked about before

      1 Reply Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Peter Goddard
        last edited by

        @Peter-Goddard

        ok, then I would say it is time to debug/print some info about
        target_start, target_end and position found.
        Make a debug build, use OutputDebugStringW and tools like DebugView
        to capture the output. Of course only, if you can’t run within Visual Studio.

        1 Reply Last reply Reply Quote 1
        • EkopalypseE Offline
          Ekopalypse
          last edited by

          Actually, it doesn’t have to be a debug build, a release build should do it as well.

          Peter GoddardP 1 Reply Last reply Reply Quote 0
          • Peter GoddardP Offline
            Peter Goddard @Ekopalypse
            last edited by

            @Ekopalypse

            Okay, I’m trying that now. I am using visual studios and I have added in my code a OutputDebugStringW, now where would I find the values that it outputs when I use my plugin in notepad?

            EkopalypseE 1 Reply Last reply Reply Quote 0
            • EkopalypseE Offline
              Ekopalypse @Peter Goddard
              last edited by

              @Peter-Goddard

              Did you start npp from within Visual Studio or did you attach (from Debug menu) npp to visual studio? If so, those should appear in
              View->Output window.

              Peter GoddardP 1 Reply Last reply Reply Quote 0
              • Peter GoddardP Offline
                Peter Goddard @Ekopalypse
                last edited by

                @Ekopalypse

                I think I have made a very obvious mistake. I forgot to specify my search flag as you mentioned in my other post. After switching it to Regexp, it seems to be working. I feel like that was very obvious and you have taken a lot of your time to help me, so thank you again for all your help.

                If anything else happens, I’ll post again. Thanks.

                1 Reply Last reply Reply Quote 3

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors