Debug a JS when it some variables only load in production?

I use custom code to load a webchat JS and it appears in production only.
I also have a workflow activating some functions of the aforementioned JS through an SDK on element click.

It doesn’t work, but I have no clue why.

Logs in workflow are useless since the workflow env doesn’t know the JS at all.

I tried to use Chrome inspect tools, but the console doesn’t help.

Any advice?

OK I added console.log(variable) in the workflow, it helps.

1 Like

Hi @felix :wave:

Did you manage to do what you wanted?

Yes, I did, thanks for asking.

There is still some confusion about using workflow for the instance vs workflow for the component (especially on static collection pages), but nonetheless it works!