hashlink-debugger
hashlink-debugger copied to clipboard
Debugger issue : Unknown variables with local functions
When we are hovering the variables, the tooltip shows "Unknown variable" instead of the value of this variable.
In the following example:
class DebuggerTest extends flash.display.Sprite { private var obj:flash.display.Sprite;
public function new() {
super();
obj = new flash.display.Sprite();
obj.x = 100;
trace(obj.x);
}
}
Hovering over obj.x
reports "Unknown variable".
Is it the intended behavior or it's not supposed to happen? Is there any workaround or specific combination of versions of VS Code/Haxe/Hash Link Debugger that this works as expected?
You're using flash API so I don't think that's HashLink debugger you're using here ?
@ncannasse This is https://github.com/openfl/openfl + https://github.com/haxelime/lime Using HashLink Debugger indeed. In what conditions is it working for you?
Here is a very simple working example with all references to flash (openfl) omitted to eliminate any confusion and possibly any collisions with other libraries:
class DebuggerTest { private var obj:Simple;
public function new(root:Any) {
obj = new Simple();
obj.x = 100;
trace(obj.x);
}
}
class Simple { private var _x:Int;
public function new() {}
public var x(get, set):Int;
private function get_x():Int {
return _x;
}
private function set_x(value:Int):Int {
_x = value;
return get_x();
}
}
Hovering on obj.x
displays "Unknown variable".
Tested with Haxe 4.1.5, HashLink Debugger v1.1.2, VS Code 1.6.5 and Hash Link 1.9.0, 1.10.0, 1.11.0.