#679 JVM - emit LocalVariable attr for debuggers

brian Thu 23 Jul 2009

See #678

brian Thu 23 Jul 2009

Promoted to ticket #679 and assigned to brian

wangzaixiang Fri 24 Jul 2009

Very interesting, I found Mr brian is a superman, and Fan evolves much quickly than other language. many new ideas and features comes to world very quickly.

brian Tue 8 Sep 2009

Ticket resolved in 1.0.46

The Java runtime will emit the LocalVariableTable if the "fan.debug" environment is set to "true":

  • configure it lib/sys.props
  • set it via environment variable
  • set it via Java System.properties

See sys::Sys.env.

Since Fan doesn't reuse registers for different variables, I just declared the scope of each variable across the entire method body.

For you guys working on debuggers, let me know if this works out for you.

Associated changeset.

drorb Wed 9 Sep 2009

Did not work with the IntelliJ IDEA plugin. Still checking if this is my fault

tcolar Wed 9 Sep 2009

Works with Netbeans, but a few "gotchas":

  • It shows a warning(no debug infos) when there are no variables at all to show (no local vars)
  • It does appear NOT to show global vars.

Screenshot: http://fanide.colar.net/fetchItem.do/Screenshot-62.png

drorb Thu 10 Sep 2009

Works with IntelliJ too.

Since Sys.debug is initialized in a static block you have to set the "fan.debug" env before the classloader loads it.

Login or Signup to reply.