diag(rdp): expand instruction logging to find desktop frames

Log first 50 instructions, then every 200th, plus any draw operation
targeting layer 0 (main display). Need to determine if RDPGFX desktop
frames are arriving or if only cursor operations are being received.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-14 12:11:12 -04:00
parent 6ddd343234
commit f9070c81f3

View File

@ -39,8 +39,11 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) {
}
if (parts.length > 0) {
instructionCount++
if (instructionCount <= 30) {
const opcode = parts[0]
// Log first 50 instructions, then every 200th, plus any layer-0 draw ops
const isLayer0Draw = (opcode === 'img' || opcode === 'rect' || opcode === 'cfill' || opcode === 'copy' || opcode === 'transfer')
&& parts[1] !== undefined && parseInt(parts[1]) === 0
if (instructionCount <= 50 || instructionCount % 200 === 0 || isLayer0Draw) {
const argSummary = opcode === 'blob'
? `[stream=${parts[1]}, ${(parts[2] || '').length} bytes]`
: parts.slice(1).join(',')