Skip to main content
By default, Synpress strips out all console.log and debugger statements from your wallet setup files when generating the cache. At first glance, it seems impossible to debug your wallet setup files. However, we’ve added a special --debug flag to our CLI, which will turn off the stripping of console.log and debugger statements. Let’s take the following wallet setup file and let’s assume that it doesn’t work:
You want to debug it because you can’t figure out why it’s not working. To do that, you’d start by checking whether the SEED_PHRASE and PASSWORD constants are correctly defined by adding two console.log statements:
By default, Synpress will strip out these console.log statements, so you won’t see anything in the console. To disable this behavior, you have to add the --debug flag to the CLI command:
If you try to run the command above, it’ll say that the cache is already built. That’s because the hash hasn’t changed since all console.log and debugger statements were stripped from the file before generating the hash. To force rebuild the cache, you’ll have to add the --force flag:
Now, you should see the outputs of your console.log statements in the console! 🎉
See the CLI section for more information about how the --force flags works.