@@ -241,6 +241,12 @@ export default defineCommand({
241241 description : "Suppress verbose output" ,
242242 default : false ,
243243 } ,
244+ debug : {
245+ type : "boolean" ,
246+ description :
247+ "Write full render diagnostics and keep intermediate artifacts under the producer .debug directory." ,
248+ default : false ,
249+ } ,
244250 strict : {
245251 type : "boolean" ,
246252 description : "Fail render on lint errors" ,
@@ -548,6 +554,7 @@ export default defineCommand({
548554 const browserGpuArg = args [ "browser-gpu" ] ;
549555 const browserGpuMode = resolveBrowserGpuForCli ( useDocker , browserGpuArg ) ;
550556 const quiet = args . quiet ?? false ;
557+ const debug = args . debug ?? false ;
551558 const batchJson = args . json ?? false ;
552559 const effectiveQuiet = quiet || ( batchPath != null && batchJson ) ;
553560 const strictAll = args [ "strict-all" ] ?? false ;
@@ -763,6 +770,7 @@ export default defineCommand({
763770 pageNavigationTimeoutMs,
764771 protocolTimeout,
765772 playerReadyTimeout,
773+ debug,
766774 exitAfterComplete : false ,
767775 throwOnError : true ,
768776 skipFeedback : true ,
@@ -815,6 +823,7 @@ export default defineCommand({
815823 videoBitrate,
816824 videoFrameFormat,
817825 quiet,
826+ debug,
818827 variables,
819828 entryFile,
820829 outputResolution,
@@ -840,6 +849,7 @@ export default defineCommand({
840849 videoFrameFormat,
841850 quiet,
842851 browserPath,
852+ debug,
843853 variables,
844854 entryFile,
845855 outputResolution,
@@ -876,6 +886,7 @@ interface RenderOptions {
876886 videoBitrate ?: string ;
877887 videoFrameFormat ?: VideoFrameFormat ;
878888 quiet : boolean ;
889+ debug ?: boolean ;
879890 browserPath ?: string ;
880891 variables ?: Record < string , unknown > ;
881892 entryFile ?: string ;
@@ -1124,6 +1135,7 @@ async function renderDocker(
11241135 entryFile : options . entryFile ,
11251136 outputResolution : options . outputResolution ,
11261137 pageSideCompositing : options . pageSideCompositing ,
1138+ debug : options . debug ,
11271139 pageNavigationTimeoutMs : options . pageNavigationTimeoutMs ,
11281140 } ,
11291141 } ) ;
@@ -1206,7 +1218,7 @@ export async function renderLocal(
12061218
12071219 const startTime = Date . now ( ) ;
12081220 const logger = createRenderTelemetryLogger (
1209- producer . createConsoleLogger ?.( "info" ) ?? createNoopProducerLogger ( ) ,
1221+ producer . createConsoleLogger ?.( options . debug ? "debug" : "info" ) ?? createNoopProducerLogger ( ) ,
12101222 ) ;
12111223
12121224 const job = producer . createRenderJob ( {
@@ -1233,6 +1245,7 @@ export async function renderLocal(
12331245 variables : options . variables ,
12341246 entryFile : options . entryFile ,
12351247 outputResolution : options . outputResolution ,
1248+ debug : options . debug ,
12361249 } ) ;
12371250
12381251 const onProgress = options . quiet
0 commit comments