Is there a way to get all variables that are currently in scope in javascript?
You can't.
Variables, identifiers of function declarations and arguments for function code, are bound as properties of the Variable Object, which is not accesible.
See also: