Future compatibility, debugger.* should be valid at syntax level.
For example, we add a debugger.xyz in the future, we cannot use it immediately because in the older engine it is a syntax error.
Solution: make debugger.* (unknown name access) to be a valid call / allowing ?. operator on it.
Example:
debugger.xyz(expr) // or
debugger.xyz?.(expr)
That would still not allow it to be used immediately, since older engines that is also a syntax error.
As with any new syntax, the solution for older engines is "transpiling".
What I mean "old" is, new enough to support debugger.log but not any other future methods.
Ah, gotcha. If it's syntax, I'd expect that to require transpiling as well; if it behaves like a function on an object, i'd expect debugger to be an object too.