diff --git a/src/server/supplements/inspectorController.ts b/src/server/supplements/inspectorController.ts index cac5b82ca6497..1bea4896d83fe 100644 --- a/src/server/supplements/inspectorController.ts +++ b/src/server/supplements/inspectorController.ts @@ -25,7 +25,7 @@ export class InspectorController implements InstrumentationListener { async onContextCreated(context: BrowserContext): Promise { if (isDebugMode()) - RecorderSupplement.getOrCreate(context, { pauseOnNextStatement: true }); + await RecorderSupplement.getOrCreate(context, { pauseOnNextStatement: true }); } async onBeforeCall(sdkObject: SdkObject, metadata: CallMetadata): Promise { @@ -53,7 +53,7 @@ export class InspectorController implements InstrumentationListener { } if (shouldOpenInspector(sdkObject, metadata)) - RecorderSupplement.getOrCreate(context, { pauseOnNextStatement: true }); + await RecorderSupplement.getOrCreate(context, { pauseOnNextStatement: true }); const recorder = await RecorderSupplement.getNoCreate(context); await recorder?.onBeforeCall(sdkObject, metadata);