To add code to software, or devices to hardware, in order to monitor (and sometimes control) operation of a system or component while under test or analysis. The code or devices so used are called instrumentation. Instrumenting code may, for example, write to a report file the before and after values of a variable together with a source reference to the code each time the variable is referenced. Some software environments provide tools to automatically add (and remove) the instrumentation and to analyse report files or screen-directed output.