]> granicus.if.org Git - python/commitdiff
Pass the full pathname to MSVC when compiling a debug version. This
authorThomas Heller <theller@ctypes.org>
Thu, 25 Apr 2002 17:29:45 +0000 (17:29 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 25 Apr 2002 17:29:45 +0000 (17:29 +0000)
allows the debugger to find the source without asking the user to
browse for it.

Lib/distutils/msvccompiler.py

index 79a4901bea1575b567ec788683d03500d0d76d0d..73cd44258ccd43fb29f01aae2ff42e9a4d428160 100644 (file)
@@ -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: