# TRACE Option EXEC

> [HTML Version](trace_option_exec.htm)

_Updated October 2025; see History_

The TRACE option EXEC traces RUN, CHAIN, command line and Xcall Ashell statements. This is particularly useful for tracking user activity. Example trace formats:

| **Context** | **Format** |
|------|------|
| RUN PROG1 (from dot prompt or command file) | <RUN:xxx> Exec(CHAIN):   <br>c:\\vm\\miame\\dsk0\\007006\\prog1.run |
| CHAIN PROG2 (from PROG1) | <PROG1:xxx> Exec(CHAIN):  <br>c:\\vm\\miame\\dsk0\\007006\\prog2.run |
| Xcall Ashell, "RUN PROG3" (from PROG2) | <PROG2:xxx> Exec(AMOS): Exec(AMOS):   <br>RUN PROG3 |
| LOG DSK0:100,150  <br>(from dot prompt or command file) | <yyyy:xxx> Exec(CMDLIN) LOG DSK0:100,150 |




So essentially you can search or filter for "Exec(" to easily pick up all the command lines and programs executed.

It also traces the A-Shell launch command line, e.g.

C:\\vm\\miame\\bin70\\ashw32.exe -i c:\\vm\\miame\\miame.ini -j slave1 -ua stslave1

or

   /vm/miame/bin/ashell -i /vm/miame/miame.ini -erz /vm/miame/sys1/ersatz.ini -hei mystart

As with other TRACE options, you can set it from/in various contexts:

| **Context** | **Statement** |
|------|------|
| In miame.ini | TRACE=EXECUTE |
| From the command prompt | SET TRACE EXECUTE ON |
| From within a program | xcall MIAMEX, MX\_GETTRACE, trflags |
| From within a program | xcall MIAMEX, MX\_SETTRACE, trflags OR TROP\_EXECUTE |




The symbol TROP\_EXECUTE is defined as \&h80000000 in [ashell.def](ashell_def.md).

**History**

2025 October, A-Shell 7.0.1779:  When the EXEC trace is set, a line showing all of the A-Shell command line arguments is added to the ashlog.