Visual Studio 远程调试 Makefile 项目的远程输出路径错误

Remote Output Path Error for Visual Studio Remote Debug Makefile Project

我想使用 VS 2017 在 Redhat Linux 服务器上调试一个开源项目 "VoltSpot"。它需要很多依赖项,如果我坚持在 Windows 上调试,那将是一团糟。

现在,我可以通过VS远程构建项目。如果我在服务器端 运行 输出似乎没问题。但是当我尝试在 VS 中调试项目时,在 VS 将构建输出复制到本地机器后显示以下错误。

(在 VS 2017 输出中指示的复制过程后弹出上述错误)

所以我的问题是如何正确设置这个远程输出路径?

在下文中,我将转储尽可能多的可能有用的信息。 Linux 服务器上的项目路径和构建输出 (voltspot2)。注意,所有对象均由 VS 2017 创建。

[yi@bar ~/projects/voltspot]$ pwd
/home/yshen233/projects/voltspot
[yi@bar ~/projects/voltspot]$ ls
example.flp           libvoltspot.a  PDN_analyze.c     plot_padloc.pl  util.o
example.mlcf          LICENSE        PDN_analyze.d     README-1.0      voltspot2
example.ptrace        Makefile       PDN_analyze.h     README-2.0      voltspot.c
example.senloc        matrix.c       PDN_analyze.o     steady.gif      voltspot.d
example.vgrid.padloc  matrix.d       pdn.config        steady.gridIR   voltspot.h
flp.c                 matrix.o       PDN_sim.c         trans.viomap    voltspot.o
flp.d                 pad.c          PDN_sim.d         trans.vtrace
flp.h                 pad.d          PDN_sim.h         util.c
flp.o                 pad.h          PDN_sim.o         util.d
HOWTO                 pad.o          plot_onchipIR.pl  util.h
[yi@bar ~/projects/voltspot]$ ./voltspot2
Usage: ./voltspot2 -f <file> -p <file> [-c <file>] [options]
Options:(may be specified in any order, within "[]" means optional)
   -f <file>    floorplan input file (e.g. example.flp) - overridden by the
                layer configuration file (e.g. 3D.lcf) when the
                latter is specified
   -p <file>    power trace input file (e.g. example.ptrace)
  [-c <file>]   input configuration parameters from file (e.g. pdn.config)
  [-v <file>]   transient PDN output file - will skip transient simulation
                if not provided
  [options]     zero or more options of the form "-<name> <value>",
                override the options from config file.

VS 2017 输出:

1>------ Build started: Project: voltspot, Configuration: Debug x64 ------
1>Validating sources
1>Copying sources remotely to 'bar.com'
1>C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\VC\VCTargets\Application Type\Linux.0\Linux.Makefile.Targets(163,5): warning : Build command not configured. Skipping...
1>Invoking 'make', working directory: '/home/yshen233/projects/voltspot'
1>gcc -O3 -Wno-unused-result -I/data/yi/superlu521/SRC  -DVERBOSE=0 -o voltspot2 voltspot.o PDN_sim.o PDN_analyze.o pad.o matrix.o flp.o util.o -lm /data/yi/superlu521/lib/libsuperlu_5.1.a -Wl,--start-group /data/yi/intel/mkl/lib/intel64/libmkl_intel_lp64.a /data/yi/intel/mkl/lib/intel64/libmkl_sequential.a /data/yi/intel/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
1>rm -f libvoltspot.a
1>ar qcv libvoltspot.a PDN_sim.o PDN_analyze.o pad.o matrix.o flp.o util.o
1>a - PDN_sim.o
1>a - PDN_analyze.o
1>a - pad.o
1>a - matrix.o
1>a - flp.o
1>a - util.o
1>ranlib libvoltspot.a
1>Copying file '/home/yshen233/projects/voltspot/voltspot2' to 'C:\Users\Yi\source\repos\voltspot\voltspot\bin\x64\Debug\voltspot2'
1>Done building project "voltspot.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

VS 2017 复制到我电脑的文件:

VS 2017 调试器配置:

这个问题可以通过使用项目的完整路径来解决。参见 issue