%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const path = require('../common/fixtures').path; const spawn = require('child_process').spawn; const assert = require('assert'); const fixture = path('debugger-repeat-last.js'); const args = [ 'inspect', `--port=${common.PORT}`, fixture, ]; const proc = spawn(process.execPath, args, { stdio: 'pipe' }); proc.stdout.setEncoding('utf8'); let stdout = ''; let sentCommand = false; let sentExit = false; proc.stdout.on('data', (data) => { stdout += data; // Send 'n' as the first step. if (!sentCommand && stdout.includes('> 1 ')) { setImmediate(() => { proc.stdin.write('n\n'); }); return sentCommand = true; } // Send empty (repeat last command) until we reach line 5. if (sentCommand && !stdout.includes('> 5')) { setImmediate(() => { proc.stdin.write('\n'); }); return true; } if (!sentExit && stdout.includes('> 5')) { setTimeout(() => { proc.stdin.write('\n\n\n.exit\n\n\n'); }, 1); return sentExit = true; } }); process.on('exit', (exitCode) => { assert.strictEqual(exitCode, 0); console.log(stdout); });