# VS\_DEBUGGER\_ENVIRONMENT doesn't work for RelWithDebInfo

**URL:** https://discourse.cmake.org/t/vs-debugger-environment-doesnt-work-for-relwithdebinfo/8802
**Category:** Usage
**Tags:** os:windows, gen:vs
**Created:** [August 22, 2023, 4:10pm UTC](https://discourse.cmake.org/t/vs-debugger-environment-doesnt-work-for-relwithdebinfo/8802 "2023-08-22T16:10:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Paul\_Baumer](https://discourse.cmake.org/user_avatar/discourse.cmake.org/paul_baumer/32/3745_2.png) [@Paul\_Baumer](https://discourse.cmake.org/u/Paul_Baumer)
#### Post date: [August 22, 2023, 4:10pm UTC](https://discourse.cmake.org/t/vs-debugger-environment-doesnt-work-for-relwithdebinfo/8802/1 "2023-08-22T16:10:57Z")

</div>

I have the following cmake line to set the debugger environment in Visual Studio.

```auto
set_property(TARGET Jing PROPERTY VS_DEBUGGER_ENVIRONMENT "DATA_DIR=data-xyz" )

```

This works fine for Release and Debug configurations in Visual Studio. But not for RelWithDebInfo. I tried generator expressions but they seemed to be ignored.

Cmake 3.25.2. Visual Studio 2022 (17.6.5).
