<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [Simulation](./server.simulation.md) &gt; [enableDebugRaycasting](./server.simulation.enabledebugraycasting.md)

## Simulation.enableDebugRaycasting() method

Enables or disables debug raycasting for the simulation.

**Signature:**

```typescript
enableDebugRaycasting(enabled: boolean): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

enabled


</td><td>

boolean


</td><td>

Whether to enable debug raycasting.

\*\*Side effects:\*\* Emits debug raycast events when `Simulation.raycast` is called.

\*\*Category:\*\* Physics


</td></tr>
</tbody></table>
**Returns:**

void

## Remarks

When enabled, raycasts emit `SimulationEvent.DEBUG_RAYCAST` for visualization.

