Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to print line numbers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to print line numbers

    I use print statement and often will have tgo search the string in my code to find the matching segment.
    Is there a way, i can automatcially print the line number?

    #2
    Hello junkone,

    Currently NinjaScript there is not a way to print a line number from within the code. Here are a couple of alternative options on what you could try.

    One option you have would be to append an id number to your print statement.
    Code:
    Print("id1" + variableName);
    You could then use control+F and search for the id you see in the output.

    Or because you know you want the line number, you could look at the line number you put the print statement on and just reference it in the print statement

    Code:
    43
    44 Print("Line 44 error");
    45
    46
    Please let me know if I may be of further assistance.

    Comment


      #3
      check this out.
      Someone wanted to know what the equivalent 'preprocessor macros' in C# are for ...

      Comment


        #4
        Hello junkone,

        I did have a look into the StackFrame class yesterday before I had replied. I did try that but unfortunately it only returns a 0. Also I did try it with the debug mode enabled in NinjaScript.

        Looking further into that it, generally speaking the StackFrame calls are used in debugging projects where you have a debug version of the application.


        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        331 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        550 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X