Skip to main content

debugenvsinherit

Specifies whether to inherit the parent environment when using debug environment variables.

debugenvsinherit ("value")

When set to On, the parent environment variables will be included alongside any custom debugenvs you specify. In Visual Studio, this appends $(LocalDebuggerEnvironment) to the environment variable list.

Parameters

value specifies the inheritance behavior:

ValueDescription
DefaultUse the toolset's default behavior (no explicit setting)
OnInherit parent environment variables
OffDo not inherit parent environment variables

Applies To

Project configurations.

Availability

Premake 5.0.0-beta8 or later.

Examples

Set custom debug environment variables while preserving system environment:

filter "configurations:Debug"
debugenvs { "MY_DEBUG_PATH=C:\\temp\\debug" }
debugenvsinherit "On"

Use only custom environment variables, ignoring parent environment:

filter "configurations:Debug"
debugenvs { "ISOLATED_ENV=1" }
debugenvsinherit "Off"

See Also