diff --git a/cmake/BornAgain/Config.cmake b/cmake/BornAgain/Config.cmake
index 87761596c764680e86c126e8cc5946537b27b941..f44ba0a6145fac2f6f55092e74f8eb80594443fa 100644
--- a/cmake/BornAgain/Config.cmake
+++ b/cmake/BornAgain/Config.cmake
@@ -16,6 +16,10 @@ if(WIN32)
     file(TO_CMAKE_PATH ${Python3_INCLUDE_DIRS} Python3_INCLUDE_DIRS)
     file(TO_CMAKE_PATH ${Python3_NumPy_INCLUDE_DIRS} Python3_NumPy_INCLUDE_DIRS)
     file(TO_CMAKE_PATH ${Python3_SITELIB} Python3_SITELIB)
+    
+    # Necessary for Visual Studio (multi-config-generator): provide also debug-exe of python3
+    string(REPLACE ".exe" "_d.exe"  Python3_EXECUTABLE_DEBUG ${Python3_EXECUTABLE})
+
 endif()
 
 configure_file(${CONFIGURABLES_DIR}/BAVersion.h.in  ${BUILD_INC_DIR}/BAVersion.h @ONLY)
diff --git a/cmake/configurables/BABuild.h.in b/cmake/configurables/BABuild.h.in
index db299ced1956950c9f72183e7c45fbf206fa9320..7b5724cafedf355f382c6c8feaf2de5246fb2e11 100644
--- a/cmake/configurables/BABuild.h.in
+++ b/cmake/configurables/BABuild.h.in
@@ -36,7 +36,11 @@ inline std::string srcDir() {
 //! Methods to access info about Python used during the build.
 
 inline std::string pythonExecutable() {
+#if defined WIN32 && defined _DEBUG
+    return "@Python3_EXECUTABLE_DEBUG@";
+#else
     return "@Python3_EXECUTABLE@";
+#endif
 }
 inline std::string pythonInterpreterID() {
     return "@Python3_INTERPRETER_ID@";