I am working on debugging some javascript code that is generated in Yesod. Yesod generates javascript files with each function on one line which makes it impossible to set break points within the function. Is there a way to change this behavior so that the javascript preserves formatting for debugging?
Share
I am currently using yesod 0.9, but I bet his will work in other versions as well.
Look in your Foundation.hs for:
and change it to:
I changed minifym -> (\bs -> Right bs) which just wraps the in coming content, javascript in our case, and returned. Or dave4420 points out below just replace minifym with (\bs -> Right bs) point free style equivalent Right.
This should make your javascript preserve its format.