This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chakrashim: Add 'Debug' object only when needed
If `--debug` is specified, the in-built 'Debug' object is exposed by chakra.dll that has some [APIs](https://msdn.microsoft.com/en-us/library/bs12a9wf(v=vs.94).aspx) that node-uwp relies on. With my change in #155, I had overriden 'Debug' global object and hence certain Debug APIs stopped working with `--debug` switch. The original intent of adding `Debug` object was that `util.js` fetches this object in Debugging context. In absense of `--debug` flag this object is unavailable and hence `util.js` throws TypeError. The fix is to expose `Debug` object only in the DebugContext (called from `util.js`). If ran with `--debug`, by the time `utill.js` code executes, engine would have already expose in-built `Debug` object and we won't overwrite it. Without `--debug` we would override `Debug` object. Thanks @agarwal-sandeep for helping debugging this issue. Fixes : #175
- Loading branch information