@@ -32,6 +32,7 @@ module.exports = (snippet, { tmpdir, timeout, memory, throwError = true, allow =
3232
3333 const fn = async ( ...args ) => {
3434 let duration
35+ let _stdout
3536 try {
3637 const { content, cleanupPromise } = await compilePromise
3738
@@ -46,6 +47,7 @@ module.exports = (snippet, { tmpdir, timeout, memory, throwError = true, allow =
4647 } )
4748 Readable . from ( content ) . pipe ( subprocess . stdin )
4849 const [ { stdout } ] = await Promise . all ( [ subprocess , cleanupPromise ] )
50+ _stdout = stdout
4951 const { isFulfilled, value, profiling, logging } = JSON . parse ( stdout )
5052 profiling . duration = duration ( )
5153 debug ( 'node' , {
@@ -61,6 +63,12 @@ module.exports = (snippet, { tmpdir, timeout, memory, throwError = true, allow =
6163 } ) ( )
6264 : { isFulfilled : false , value : deserializeError ( value ) , profiling, logging }
6365 } catch ( error ) {
66+ console . log ( '=========== DEBUG ===========' )
67+ console . log ( 'error' , error )
68+ console . log ( 'args' , JSON . stringify ( args ) )
69+ console . log ( '_stdout' , JSON . stringify ( _stdout ) )
70+
71+ console . log ( '=========== DEBUG ===========' )
6472 if ( error . signalCode === 'SIGTRAP' ) {
6573 throw createError ( {
6674 name : 'MemoryError' ,
0 commit comments