@@ -9,6 +9,7 @@ import bundleSource from '@agoric/bundle-source';
9
9
import './types.js' ;
10
10
import { insistStorageAPI } from './storageAPI.js' ;
11
11
import { initializeKernel } from './kernel/initializeKernel.js' ;
12
+ import { kdebugEnable } from './kernel/kdebug.js' ;
12
13
13
14
/**
14
15
* @param {X[] } xs
@@ -218,7 +219,7 @@ export function swingsetIsInitialized(hostStorage) {
218
219
* @param {SwingSetConfig } config
219
220
* @param {string[] } argv
220
221
* @param {HostStore } hostStorage
221
- * @param {{ kernelBundles?: Record<string, string> } } initializationOptions
222
+ * @param {{ kernelBundles?: Record<string, string>, verbose?: boolean } } initializationOptions
222
223
* @param {{ env?: Record<string, string | undefined > } } runtimeOptions
223
224
*/
224
225
export async function initializeSwingset (
@@ -266,7 +267,10 @@ export async function initializeSwingset(
266
267
assert . fail ( X `unknown manager type ${ defaultManagerType } ` ) ;
267
268
}
268
269
269
- const { kernelBundles = await buildKernelBundles ( ) } = initializationOptions ;
270
+ const {
271
+ kernelBundles = await buildKernelBundles ( ) ,
272
+ verbose,
273
+ } = initializationOptions ;
270
274
271
275
kvStore . set ( 'kernelBundle' , JSON . stringify ( kernelBundles . kernel ) ) ;
272
276
kvStore . set ( 'lockdownBundle' , JSON . stringify ( kernelBundles . lockdown ) ) ;
@@ -386,5 +390,8 @@ export async function initializeSwingset(
386
390
await bundleBundles ( config . vats , 'vats' ) ;
387
391
await bundleBundles ( config . devices , 'devices' ) ;
388
392
393
+ if ( verbose ) {
394
+ kdebugEnable ( true ) ;
395
+ }
389
396
return initializeKernel ( config , hostStorage ) ;
390
397
}
0 commit comments