#include #include #include #include "ModuleInternal.h" #include "NativeScriptException.h" #include "RuntimeConfig.h" #include "Caches.h" #include "Helpers.h" using namespace v8; namespace tns { ModuleInternal::ModuleInternal(Local context) { std::string requireFactoryScript = "(function() { " " function require_factory(requireInternal, dirName) { " " return function require(modulePath) { " " if(global.__pauseOnNextRequire) { debugger; global.__pauseOnNextRequire = false; }" " return requireInternal(modulePath, dirName); " " } " " } " " return require_factory; " "})()"; Isolate* isolate = context->GetIsolate(); Local global = context->Global(); Local