debug(4x3): use console.error for release-build visibility + build marker

This commit is contained in:
2026-09-08 21:15:25 +07:00
parent fcad148798
commit 5a94978f33
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -27,6 +27,9 @@ import './global.css';
const SESSION_KEY = 'saved_session';
// DEBUG-4x3 (remove after diagnosis): build marker — prints once at JS eval.
console.error('[camdebug-ver] debug build console.error path');
export default function App() {
const [mode, setMode] = useState<'camera' | 'library'>('camera');
const [recipes, setRecipes] = useState<Recipe[]>([]);
+3 -3
View File
@@ -453,7 +453,7 @@ export default function Viewfinder({
const line = `ft=${ftW}x${ftH} o=${orient} mir=${dbgMir} band=0 feed=[${feed.map((f) => f.toFixed(3)).join(',')}]`;
if (dbgCount % 60 === 0 || line !== dbgLastSync.getBlocking()) {
dbgLastSync.setBlocking(line);
console.warn('[camdebug] ' + line);
console.error('[camdebug] ' + line);
}
drawFullFrame();
return;
@@ -530,7 +530,7 @@ export default function Viewfinder({
const line = `ft=${ftW}x${ftH} o=${orient} mir=${dbgMir} band=1 feed=[${feed.map((f) => f.toFixed(3)).join(',')}] up=${ow}x${oh} ac=${ac.toFixed(4)} vis=${visX.toFixed(3)}x${visY.toFixed(3)} X0=${X0.toFixed(0)} Y0=${Y0.toFixed(0)} X1=${X1.toFixed(0)} Y1=${Y1.toFixed(0)} raw=${u0.toFixed(0)},${v0.toFixed(0)} ${rw.toFixed(0)}x${rh.toFixed(0)} s=${s.toFixed(4)} d=${dx.toFixed(0)},${dy.toFixed(0)}`;
if (dbgCount % 60 === 0 || line !== dbgLastSync.getBlocking()) {
dbgLastSync.setBlocking(line);
console.warn('[camdebug] ' + line);
console.error('[camdebug] ' + line);
}
// Fresh paint; its default color is opaque black (Skia default), so
// the surface fill below needs no explicit color set.
@@ -623,7 +623,7 @@ export default function Viewfinder({
}, [cameraPhotoRect, vw, vh, feedRectSync]);
// DEBUG-4x3 (remove): correlate JS view/region state with the worklet log.
useEffect(() => {
console.log(
console.error(
'[camdebug-js] region=' + JSON.stringify(region) +
' band=' + regionBand +
' ratio=' + aspectRatio +