# The problem The server log buffer, created with `dap-start-debugging-noexpand` does not keep environment variables for re-execution using `recompile` ## How to reproduce: run ``` (dap-start-debugging-noexpand '(:program-to-start "/bin/sh -c 'echo FOO=$FOO'" :environment-variables (("FOO" . "BAR")) :name "test-compile-bug" :cwd "." :skip-debug-session t)) ``` The output will be like: ``` -*- mode: dap-server-log; default-directory: "/usr/bin/" -*- Debug Adapter started at Thu Sep 23 09:35:56 /bin/sh -c 'echo FOO=$FOO' FOO=BAR Debug Adapter finished at Thu Sep 23 09:35:56 ``` Press `g` in the log buffer, now the output will be like: ``` -*- mode: dap-server-log; default-directory: "/usr/bin/" -*- Debug Adapter started at Thu Sep 23 09:38:58 /bin/sh -c 'echo FOO=$FOO' FOO= Debug Adapter finished at Thu Sep 23 09:38:58 ``` ## What is expected The command is re-executed using same environment ## Affected use cases I run tests `dap-java-run-test-class` which uses an environment variable to pass java classpath.