How to use the node-opcua-debug.trace_from_this_projet_only function in node-opcua-debug

To help you get started, we’ve selected a few node-opcua-debug examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-object-registry / src / objectRegistry.js View on Github external
ObjectRegistry.prototype.register = function (obj) {

    if (!this._objectType) {
        this._objectType = obj.constructor;
    }

    if (!obj._____hash) {
        obj._____hash = hashCounter;
        hashCounter += 1;
        this._cache[obj._____hash] = obj;
    }

    // istanbul ignore next
    if (ObjectRegistry.doDebug) {
        obj._____trace = trace_from_this_projet_only(new Error());
    }
};
github node-opcua / node-opcua / packages / node-opcua-object-registry / source / objectRegistry.ts View on Github external
public register(obj: any): void {

        if (!this._objectType) {
            this._objectType = obj.constructor;
        }

        if (!obj._____hash) {
            obj._____hash = hashCounter;
            hashCounter += 1;
            this._cache[obj._____hash] = obj;
        }

        // istanbul ignore next
        if (ObjectRegistry.doDebug) {
            obj._____trace = trace_from_this_projet_only();
        }
    }
github node-opcua / node-opcua / packages / node-opcua-leak-detector / src / resource_leak_detector.js View on Github external
exports.installResourceLeakDetector = function(isGlobal, func) {

    const trace = trace_from_this_project_only();

    if (isGlobal) {
        before(function() {
            const self = this;
            resourceLeakDetector.ctx = self.test.ctx;
            resourceLeakDetector.start();
            // make sure we start with a garbage collected situation
            if (global.gc) {
                global.gc(true);
            }
        });
        beforeEach(function() {
            // make sure we start with a garbage collected situation
            if (global.gc) {
                global.gc(true);
            }
github node-opcua / node-opcua / packages / node-opcua-server / src / server_engine.js View on Github external
ServerEngine.prototype.__internal_bindMethod = function (nodeId, func) {

    const engine = this;
    assert(_.isFunction(func));
    assert(nodeId instanceof NodeId);

    const methodNode = engine.addressSpace.findNode(nodeId);
    if (!methodNode) {
        return;
    }
    if (methodNode && methodNode.bindMethod) {
        methodNode.bindMethod(func);
    } else {
        //xx console.log((new Error()).stack);
        console.log("WARNING:  cannot bind a method with id ".yellow + nodeId.toString().cyan + ". please check your nodeset.xml file or add this node programmatically".yellow);
        console.log(require("node-opcua-debug").trace_from_this_projet_only(new Error()))
    }
};
github node-opcua / node-opcua / packages / node-opcua-server / source / server_engine.ts View on Github external
assert(_.isFunction(func));
    assert(nodeId instanceof NodeId);

    const methodNode = engine.addressSpace!.findNode(nodeId)! as UAMethod;
    if (!methodNode) {
      return;
    }
    if (methodNode && methodNode.bindMethod) {
      methodNode.bindMethod(func);
    } else {
      console.log(
        chalk.yellow("WARNING:  cannot bind a method with id ") +
        chalk.cyan(nodeId.toString()) +
        chalk.yellow(". please check your nodeset.xml file or add this node programmatically"));

      console.log(trace_from_this_projet_only());
    }
  }