How can I inspect the environment variables of a running process?
You can inspect environmental variables of running process with
ps eww <PID>
The following adds on to Mateusz's answer, pretty printing the variables one per line:
ps eww -o command <PID> | tr ' ' '\n'