Purescript: Output "debugger;" call before throwing a pattern match exception

Created on 13 Jun 2017  路  2Comments  路  Source: purescript/purescript

I think this would be a useful default, since debugger is ignored unless the debugger is turned on. We would need to throw an exception anyway, since we need to do _something_ in case the debugger isn't on, but I think this would be better than guessing from the message which value caused a match to fail.

codegen enhancement

Most helpful comment

This seems odd to me. Chrome's dev tools have an option to pause on exceptions which would have the same effect. Would that be enough?

All 2 comments

This seems odd to me. Chrome's dev tools have an option to pause on exceptions which would have the same effect. Would that be enough?

It is ignored in node, but it isn't in a browser where indeed one can pause on exceptions.
What about adding it when compiled with a --debug flag on?

Was this page helpful?
0 / 5 - 0 ratings