Skip to content

Commit c7391d3

Browse files
Eric Migicovskyclaude
andcommitted
qemu-wasm: surface pkjs logs in the on-page console
JS-side activity (app start, fetch failures, geolocation denials) was only visible in devtools; mirror it into the page's console panel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pi1WErefJ7c6kXodajm25M Signed-off-by: Eric Migicovsky <eric@repebble.com>
1 parent 1731f39 commit c7391d3

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

tools/qemu-wasm/site-dist/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ <h1>PebbleOS Emulator</h1>
471471
let busy = false;
472472

473473
const say = (msg) => { statusEl.textContent = msg; console.log('[install] ' + msg); };
474-
const jsLog = (msg) => { console.log('[pkjs] ' + msg); };
474+
// pkjs activity goes to the on-page console too, so JS-side issues
475+
// (fetch failures, geolocation denials) are visible without devtools.
476+
const jsLog = (msg) => {
477+
console.log('[pkjs] ' + msg);
478+
if (window.log) window.log('[pkjs] ' + msg);
479+
};
475480

476481
// CORS-proxy fallback for the JS apps' web requests and store
477482
// downloads. Override with ?pkjs_proxy=<url-prefix>; the target URL

tools/qemu-wasm/web/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ <h1>PebbleOS Emulator</h1>
471471
let busy = false;
472472

473473
const say = (msg) => { statusEl.textContent = msg; console.log('[install] ' + msg); };
474-
const jsLog = (msg) => { console.log('[pkjs] ' + msg); };
474+
// pkjs activity goes to the on-page console too, so JS-side issues
475+
// (fetch failures, geolocation denials) are visible without devtools.
476+
const jsLog = (msg) => {
477+
console.log('[pkjs] ' + msg);
478+
if (window.log) window.log('[pkjs] ' + msg);
479+
};
475480

476481
// CORS-proxy fallback for the JS apps' web requests and store
477482
// downloads. Override with ?pkjs_proxy=<url-prefix>; the target URL

0 commit comments

Comments
 (0)