Tracing

Tracing features provide step-by-step emulation for Visual Basic 5.0/6.0 Native Code and P-Code. This functionality requires a license with Tracing features. The tracer operates on the internal emulator's representation of a procedure; it does not execute the target procedure on the workstation's CPU.

Starting a trace

  1. Open a VB5/6 procedure and keep addresses visible in the listing.
  2. On the line to investigate, invoke Trace to this address from the code context menu, or press F4.
  3. Inspect the tracer's code and state displays and advance using Next. Cancel the trace when finished.

From version 26.4, the command can resolve the leading loc_ address after trimming whitespace at the start of the line. You can place the caret elsewhere on that line rather than precisely on its address label.

Native Code tracer showing code and emulated state

Native Code state

The tracer exposes CPU and FPU registers, the stack, variables, and the reconstructed code as emulation advances. Use these views to examine how a value or expression was derived. Variable-list search and display of the current object's recovered type can help with larger procedures.

P-Code tracing

P-Code tracing, introduced in version 11, shows how variable information and decompiled statements develop during processing. It can help explain differences between the intermediate P-Code operations and the optimized high-level listing.

Scope and limitations

  • Tracing applies to an individual procedure. It starts with an empty emulated register, stack, and variable state rather than the state of a running process.
  • Unsupported Native Code instructions may be skipped. External function calls are not executed; supported calling-convention handling can adjust the modeled stack without reproducing the external function's behavior.
  • The tracer does not provide a complete processor-flags display. Do not interpret its state as a complete hardware execution trace.
  • The documented model is forward step-by-step emulation, without reverse tracing or repeated execution of loop iterations.
  • This workflow describes VB5/6 tracing. The presence of .NET disassembly does not imply a .NET runtime debugger.

Use tracing to investigate the decompiler's reconstruction and intermediate values. An emulated value alone does not establish the value produced by an actual process with initialized globals, external dependencies, and input data.