# MotionDebugger

Toggle motion tracking and creation stack capture. Read tracking entries through Items.

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public static class MotionDebugger
```

[Runtime/Diagnostics/MotionDebugger.cs · L12](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L12)

## Enabled

Enable or disable tracking of newly scheduled motions.

```csharp
public static bool Enabled;
```

[Runtime/Diagnostics/MotionDebugger.cs · L14](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L14)

## EnableStackTrace

Choose whether tracking captures creation stack traces.

```csharp
public static bool EnableStackTrace;
```

[Runtime/Diagnostics/MotionDebugger.cs · L15](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L15)

## Items

Read the currently tracked entries as a read-only list.

```csharp
public static IReadOnlyList<TrackingState> Items { get; }
```

[Runtime/Diagnostics/MotionDebugger.cs · L17](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L17)

## AddTracking

Add an active handle to tracking unless it is already tracked.

```csharp
public static void AddTracking(MotionHandle motionHandle, IMotionScheduler scheduler, int skipFrames = 3)
```

Parameters

- `motionHandle` (`MotionHandle`) Handle to control or link.
- `scheduler` (`IMotionScheduler`) Scheduler that determines where the motion is registered and updated.
- `skipFrames = 3` (`int`) Number of leading stack frames to omit when recording a trace.

[Runtime/Diagnostics/MotionDebugger.cs · L26](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L26)

## Clear

Clear tracking records. Control motion playback through its handle.

```csharp
public static void Clear()
```

[Runtime/Diagnostics/MotionDebugger.cs · L34](../../../source/Runtime/Diagnostics/MotionDebugger.cs.html#L34)

## Related types

- [MotionDebugger.TrackingState](../../../en/api/motiondebugger-trackingstate/index.md)
