Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Possible feature -view line number in results

    Hello!

    I am curious if this is an existing feature or one that could be added.

    The idea is to print the line number of a command whenever that command prints something to the results window.

    So, for example, after a duplicates drop, instead of printing "Duplicates in terms of X Y Z"

    it prints "120: Duplicates in terms of X Y Z" as the instruction came from line 120.

    This would be a nice visual option, allowing you to more quickly trace output and errors in the results window to code in the do-file editor. I don't see it in the menu but I might be missing it.

    Best,
    Bruce

  • #2
    I am not aware of any such functionality. I think one among several problems here is that Stata commands can and do call other commands, and similarly for do-files So, suppose your duplicates command is called from a do-file, or from another command. What line do you want here?

    The problem is akin to showing such information for debuggling, which is quite often requested. Stata commands don't get passed that information when they are called; it's irrelevant to how they work.

    Sorry to be so sceptical, but my reaction is that this would just clutter up output. Now I guess you want this to be entirely optional, which in itself makes sense, except for the issue I've just outlined.

    Comment

    Working...
    X