adds debug prints to js.