save before filter
Some checks failed
Tests / Tests (push) Has been cancelled
ESLint Check / ESLint Check and Report Upload (push) Has been cancelled
Prettier Check / Format Check (push) Has been cancelled
Prettier Check / Format Code (push) Has been cancelled
ESLint Check / Build Base for Bundle Size Comparison (push) Has been cancelled

This commit is contained in:
xugp
2026-04-01 12:00:00 +08:00
parent 01d6e87a53
commit 87c94ae3a9
6 changed files with 254 additions and 0 deletions

47
debug-all.js Normal file
View File

@@ -0,0 +1,47 @@
const puppeteer = require('puppeteer-core');
(async () => {
const browser = await puppeteer.launch({
headless: true,
executablePath: 'C:\\Users\\xgp\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe',
args: ['--allow-file-access-from-files', '--disable-web-security']
});
const page = await browser.newPage();
page.on('response', async r => {
const s = r.status();
const url = r.url();
if (s >= 400) {
console.log('ERROR', s, url);
} else if (s >= 300) {
console.log('REDIRECT', s, url);
} else {
console.log('SUCCESS', s, url.split('/').pop());
}
});
page.on('requestfailed', req => {
console.log('REQUEST FAILED', req.failure().errorText, req.url());
});
page.on('request', req => {
console.log('REQUEST', req.url().split('/').pop());
});
page.on('console', msg => {
console.log('CONSOLE', msg.type(), msg.text());
});
await page.goto('file:///C:/Users/xgp/projects/rrweb/index.html', {
waitUntil: 'networkidle2',
timeout: 120000
});
await new Promise(r => setTimeout(r, 3000));
await browser.close();
})().catch(e => {
console.error(e);
process.exit(1);
});