Skip to content

The server log buffer, created with dap-start-debugging does not keep environment variables for reexecution using recompile #510

Open
@dudinea

Description

@dudinea

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions