From: Thomas Heller Date: Thu, 25 Apr 2002 17:29:45 +0000 (+0000) Subject: Pass the full pathname to MSVC when compiling a debug version. This X-Git-Tag: v2.3c1~5795 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69d31b749d79c9831201ab5dd72411062bcb2b1c;p=python Pass the full pathname to MSVC when compiling a debug version. This allows the debugger to find the source without asking the user to browse for it. --- diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 79a4901bea..73cd44258c 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -309,6 +309,12 @@ class MSVCCompiler (CCompiler) : else: self.mkpath (os.path.dirname (obj)) + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + if ext in self._c_extensions: input_opt = "/Tc" + src elif ext in self._cpp_extensions: