When things go wrong in job code, pretty much the only technique available today is to console.log various bits of state and hope to see something interesting.
This is a common debugging technique in web development generally, but I wish that more developers would use the Javascript debugger to track down issues. It’s faster, tidier, helps you understand the code better, and creates less churn on the source code (fewer log lines, fewer commented-out lines).
I also want to enable live debugging in the CLI, for the same reasons. The idea is that if you do openfn job.js --debug
, a debugger window will open (chrome devtools) and give you access to the live environment.
We need to be able to sourcemap to the original code, and we should probably “blackbox” all runtime code - just enable debugging on job and adaptor code.