Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger issue : Unknown variables with local functions #104

Open
Fl0xer opened this issue Nov 18, 2021 · 4 comments
Open

Debugger issue : Unknown variables with local functions #104

Fl0xer opened this issue Nov 18, 2021 · 4 comments

Comments

@Fl0xer
Copy link

Fl0xer commented Nov 18, 2021

When we are hovering the variables, the tooltip shows "Unknown variable" instead of the value of this variable.

@Fl0xer Fl0xer changed the title Unknown variables with the debugger Debugger issue : Unknown variables with local functions Nov 18, 2021
@inovento
Copy link

inovento commented Mar 3, 2022

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?

@ncannasse
Copy link
Member

You're using flash API so I don't think that's HashLink debugger you're using here ?

@inovento
Copy link

inovento commented Mar 4, 2022

@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?

@inovento
Copy link

inovento commented Mar 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants