From 10e5019436b118090396a3d36e5c981edf2122a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 16 May 2024 23:42:26 +0200 Subject: [PATCH] Add a way to debug browser logs --- packages/playwright-core/src/server/browserType.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/playwright-core/src/server/browserType.ts b/packages/playwright-core/src/server/browserType.ts index cfa8862b84..412d2baf25 100644 --- a/packages/playwright-core/src/server/browserType.ts +++ b/packages/playwright-core/src/server/browserType.ts @@ -33,6 +33,7 @@ import type * as types from './types'; import type * as channels from '@protocol/channels'; import { DEFAULT_TIMEOUT, TimeoutSettings } from '../common/timeoutSettings'; import { debugMode } from '../utils'; +import { debug } from '../utilsBundle'; import { existsAsync } from '../utils/fileUtils'; import { helper } from './helper'; import { RecentLogsCollector } from '../utils/debugLogger'; @@ -197,6 +198,7 @@ export abstract class BrowserType extends SdkObject { handleSIGTERM, handleSIGHUP, log: (message: string) => { + debug('pw:browser')(message); if (waitForWSEndpoint) { const match = message.match(/DevTools listening on (.*)/); if (match)