Request paths
Problem with exit-only logging
If you only log when a function returns, nested calls finish deepest-first:
service → controller → responseThat is accurate chronologically for exits, but hard to read as a call stack.
Double-point model
IDebug emits enter then exit for each wrapped function:
request → controller↓ → service↓ → db:user.findMany → service↑ → controller↑ → responsePayload field: phase: 'enter' | 'exit' on functionCall events. Database round-trips are dbQuery leaves under the active frame (see @idebug/db).
UI
- Request path strip: chips with
↓/↑and teal DB leaves - Call tree: hierarchical controller → service → query
- Timeline badges:
FN↓enter,FN↑exit,DBquery
Legacy sessions without phase are reconstructed in the UI (enter order = reverse of exit order).
What to wrap
| Layer | How |
|---|---|
| Express helpers | logFunction / logModule |
| Nest methods | @Loggable() |
| Nest handlers | PerformanceInterceptor (when performance on) |
Unwrapped pure controllers will only show req / res (and middleware) until you decorate or wrap deeper calls.