iriscouch / traceback

Easy access to the call stack, for Node.js
Apache License 2.0
44 stars 6 forks source link

Does not work in strict_mod #3

Open fulup-bzh opened 9 years ago

fulup-bzh commented 9 years ago

I use traceback since now a while. But my new NodeJS Policy moved to "--strict_mod" everywhere. In fact I really think that this should be NodeJS default policy, but that's an other story.

Unfortunately "traceback" fail when run in "strict_mode" here after the error. frame.type = frame.getTypeName() ^ TypeError: Cannot read property 'constructor' of undefined at CallSiteGetTypeName (native)

bthibault commented 9 years ago

Same error.

fulup-bzh commented 9 years ago

It is possible to turn around this issue by adding 'use strict' in all your modules while not enforcing --use_strict at command level. I found out few other modules that I use 'ie: Jison' that are incompatible with global --use_strict.

This being said, I love the --use_strict that save me a huge amount of time in debug. Hopefully soon every published NodeJS module will enforce it.

bthibault commented 9 years ago

No my issue was triggered by using 'use strict' in the module

fulup-bzh commented 9 years ago

This is not a critical issue, but hopefully someone is going to fix it. Software developers need everything '--use_strict', 'trace', 'debug', .... Debugger is an other key component that does not work with '--use_strict'

bthibault commented 9 years ago

Looks like its been fixed in a fork :

https://github.com/JulianHH/traceback

goloroden commented 9 years ago

+1

helderbrandao commented 9 years ago

+1

joaosp commented 9 years ago

+1