### Required prerequisites - [X] Make sure you've read the [documentation](https://pybind11.readthedocs.io). Your issue may be addressed there. - [X] Search the [issue tracker](https://github.com/pybind/pybind11/issues) and [Discussions](https:/pybind/pybind11/discussions) to verify that this hasn't already been reported. +1 or comment there if it has. - [X] Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new). ### Problem description After updating to VS2022 my build was broken, I originally reported it to [Microsoft](https://github.com/microsoft/STL/issues/2335), but turns out it is probably pybind bug. You are not allowed to undef _DEBUG macro. https://github.com/pybind/pybind11/search?q=_DEBUG ### Reproducible example code ```text My code was broken in Debug build in VS 2022, I used 2.6, but master seems to have same undef. ```
Required prerequisites
Problem description
After updating to VS2022 my build was broken, I originally reported it to Microsoft, but turns out it is probably pybind bug.
You are not allowed to undef _DEBUG macro.
https://github.com/pybind/pybind11/search?q=_DEBUG
Reproducible example code