TraceMethod not working as expected

Home Forums CodeSite TraceMethod not working as expected

Viewing 5 reply threads
  • Author
    Posts
    • #2889
      Andy Bell
      Participant

        Hi

        I’m using CodeSite V5.4.0 with C++ Builder 10.2 and just testing how it works.

        I have this simple code:

        CS->TraceMethod(“Test method”);
        for (auto i = 0; i < 10; i++) {
        CS->SendError(“Log message”);
        CS->SendWarning(“Warning message”);
        CS->SendScreenShot(“Screen shot”, (unsigned)this->Handle);
        }

        return;

        but the output is as per the attached screen shot. It doesn’t look right to me. Am I using it wrong?

        AndyCS issue

         

      • #2891
        Ray Konopka
        Keymaster

          Hi,

          No, you are not using it incorrectly. Unfortunately, there was a change in C++Builder (I do not remember the precise version), but it broke the TraceMethod functionality. It’s on our list of things to fix for the next major release. In the meantime, you can use the EnterMethod/ExitMethod approach to group your CodeSite messages by method.

          Ray

        • #2892
          Andy Bell
          Participant

            Thanks Ray

            Andy

          • #4064
            David Rose
            Participant

              Seems that it’s broken in Delphi (11) too as I’m having a similar issue.

            • #4066
              Ray Konopka
              Keymaster

                Hi David,

                I just created a quick test project in Delphi 11 and created the following event handler:

                procedure TForm13.RzButton1Click(Sender: TObject);
                begin
                  CodeSite.TraceMethod( 'RzButton1Click' );
                  CodeSite.Send( 'Test Message' );
                  CodeSite.Send( 'Test Message #2' );
                end;

                I ran the program and the output showed the two test messages within an EnterMethod message and an ExitMethod message.

                Are you able to duplicate the problem in a test project? If so, please send the source (no executables) to support@raize.com and I’ll take a look.

                Ray

              • #4068
                David Rose
                Participant

                  It’s odd. In the large project I was having the issue, it goes wrong in one method, but not in several others.

                  Just in case it helps, my codesite messages were in methods in objects called from the method being traced.

                  I’ll try and reproduce in a  test project.

              Viewing 5 reply threads
              • You must be logged in to reply to this topic.