Skip to content

Commit

Permalink
split heavier debugs to verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
cacieprins committed Jul 15, 2024
1 parent 4c5d899 commit fc52033
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/server/lib/browsers/cdp-command-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { CdpCommand } from './cdp_automation'
import Debug from 'debug'

const debug = Debug('cypress:server:browsers:cdp-command-queue')
const debugVerbose = Debug('cypress:server:browsers:cd-command-queue')

type CommandReturn<T extends CdpCommand> = ProtocolMapping.Commands[T]['returnType']

Expand All @@ -26,7 +27,8 @@ export class CDPCommandQueue {
params: ProtocolMapping.Commands[TCmd]['paramsType'][0],
sessionId?: string,
): Promise<CommandReturn<TCmd>> {
debug('enqueing command %s with params %o', command, params)
debug('enqueing command %s', command)
debugVerbose('enqueing command %s with params %o', command, params)

const deferred = pDefer<CommandReturn<TCmd>>()

Expand All @@ -39,7 +41,8 @@ export class CDPCommandQueue {

this.queue.push(commandPackage)

debug('Queue: %O', this.queue)
debug('Command enqueued; new length: %d', this.queue.length)
debugVerbose('Queue Contents: %O', this.queue)

return deferred.promise
}
Expand Down

0 comments on commit fc52033

Please sign in to comment.