NodeJS with debug symbols?

How do I get a debug build of node?

I tried doing

nix-build -E 'with import <nixpkgs> {}; enableDebugging nodejs-12_x'

but that simply outputs the existing derivation without debugging symbols.

Is there another option?

PS: I had to edit the v12.nix file to include ... in the function arguments becauese enableDebugging apparently calls the packages without checking which attributes it accepts. That’s probably a bug?