1. 6

Tracing can be seen as a mechanism to facilitate an overall process called debugging. In other words, the two form a hierarchical relationship where tracing falls under debugging. Having said that, tracing and debugging can also be seen two related and non-hierarchal peer disciplines. Debugging has connotation of active involvement of programmer and uses concepts like ‘stepping through code’, breakpoints etc. Tracing complements debugging - and hence is in non-hierarchical relationship with debugging - by performing an introspection of what a process did.

Both are nevertheless very much related and the underlying mechanisms that enable tracing and debugging overlap a lot - take ptrace for example.

My question is, is there a term which collectively denotes tracing and debugging? It will be nice to be able to use one word instead of typing ‘tracing and debugging’ every time.

  1.  

  2. 7

    Both often fall under the umbrella of “instrumentation”, which is the umbrella term I usually use for that. You instrument you application, but for many different goals. “tracing” is a part of the “how”, debugging a part of “what for?”.

    1. 2

      Thank you. True, the term instrumentation is very related, it is still a separate concept. It is more a technique which can facilitate tracing and debugging. Furthermore, some debugging and tracing can be performed without instrumentation.

      1. 2

        The only debugging I can think of, that exists without tracing (which is either static or dynamic instrumentation) is just manually looking at the code, which could be seen as just tracing in your head.

        EDIT: It would seem they are just abstractions, where it goes instrumentation -> tracing -> debugging, in terms of lowest to highest abstraction.

        1. 1

          Yes, the technology underneath tracing and debugging overlap, but still debugging is distinct. For example, breakpoints are a concept that is relevant to debugging only. Similarly single-stepping is debugging only. Tracing needs neither of them.

          1. 1

            I suppose arguing semantics is exactly what the question poses, but I would say you are interactively tracing through code, via instrumentation, when adding breakpoints and single-stepping.

            1. 1

              Technically that’s correct and in that sense instrumentation, tracing and debugging are different levels of abstraction. This is what I called “hierarchical relationship” between tracing and debugging in my original post.

              However, tracing is also distinct in the sense that it has applications other than debugging. As an example, let’s say in near future we have a way to record everything that some software controlling an autonomous driving car did when it got into an accident. That technology will be called tracing and calling it debugging would be misleading. It is in this sense when I say tracing and debugging aren’t different levels of abstractions, but are non-hierarchical peers.

            2. 1

              I think “using a debugger” and “debugging” are distinct. I hardly ever break out a debugger. But boy do I debug a lot.

      2. 2

        I’ve not seen a term that denotes both “tracing” and “debugging” in the books I’ve read. That’s probably because most authors consider debugging to be a much larger concept in which tracing may be used. “Tracing and debugging” is often just “tracing” since if you’re tracing, you’re probably debugging. (And if you’re not debugging, you’re just logging a lot.)

        1. 1

          Yes, that’s been my experience too. But I differ when you say “if you’re tracing, you’re probably debugging” (and I’m open to corrections so please do rectify my statements below). Tracing can be used for purposes other than debugging. Such as, performance optimisation and software audit.

          EDIT: I think this is an interesting discussion because may be the reason why such a term doesn’t exist is that this space of computer science has more to be explored.

          1. 1

            I don’t think there is much to be had from splitting hairs over the semantics of “tracing”. I would advise looking to the usage in the vernacular and the literature. I said “if you’re tracing, you’re probably debugging” because I can’t really think of a case where someone talked or wrote about tracing without being in the context of debugging. This includes books from the 1970s through to today.