Rex_LookUp Debugger Problem

0 favourites
  • 1 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Hello everybody!

    When I ported the Rex_LookUp plugin to the C3Runtime, I ran into some problems with debugger. In this plugin, the debugger values are generated from two places: from the instanceProto and TestMgrKlassProto functions.

    // Plugin debugger code (C2Runtime)
    // All plugin code: https://github.com/rexrainbow/C2Plugins/blob/master/plugins/rex_lookup/runtime.js
    instanceProto.getDebuggerValues = function (propsections)
    	{
    	 var prop = [];
    	 // show test result
    	 this.tests.getDebuggerValues(prop);
    
    	 // show property	 
    	 prop.push({"name": "Property", "value": "Value"});
    	 for (var n in this.props)
    	 {
    	 prop.push({"name": n, "value": this.props[n]});
    	 }	 
    	 
    		propsections.push({
    			"title": this.type.name,
    			"properties": prop
    		});
    	};
    	//
    TestsMgrKlassProto.getDebuggerValues = function (propsections)
    	{
    	 // show test result
    	 propsections.push({"name": "Test", "value": "Result"});
    	 
     var i, cnt=this.tests.length;	
     var info; 
     for (i=0; i<cnt; i++)
     {
     info = this.tests[i].extra;
     propsections.push({"name": info["name"], "value": info["result"]});
     } 
    	};

    I tried to do the same thing in C3Runtime (implement instanceProto functions in c3runtime/instance.js, and TestMgrKlassProto in c3runtime/plugin.js):

    // c3runtime/instance.js debugger code
    // Full version: https://pastebin.com/DJ9YqbFn
    GetDebuggerProperties()
    		{
    			globalThis.prop = [];
    			// show test result
    			this.tests.getDebuggerValues(prop);
    			// show property
    			prop.push({name: "Property", value: "Value"});
    			for (var n in this.props)
    			{
    				prop.push({name: n, value: this.props[n]});
    			}
    			return [{
    				title: "LookUp",
    				properties: prop
    			}];
    		}
    // c3runtime/plugin.js debugger code
    // Full version: https://pastebin.com/fQsZhs4e
    TestsMgrKlassProto.getDebuggerValues = function (prop)
    				{
    					// show test result
    					prop.push({name: "Test", value: "Result"});
    					var i, cnt=this.tests.length;	
    					var info; 
    					for (i=0; i<cnt; i++)
    					{
    						info = this.tests[i].extra;
    						prop.push({name: info["name"], value: info["result"]});
    					}
    				};

    In C2Runtime everything works fine, but in C3Runtime the debugger values ​​are infinitely generated:

    How to fix it?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)