简体   繁体   English

在非开发机上调试VS2008 C ++项目

[英]Debugging VS2008 C++ project on non-dev machine

I am experienced in debugging C++ in Visual Studio on the development machine, running a debug session and then breaking into the code when an Assert or Exception is encountered. 我有在开发机器上的Visual Studio中调试C ++,运行调试会话,然后在遇到断言或异常时闯入代码的经验。

But now I want this same facility when I am testing the project on another machine, specifically to see the break location, call stack, variable values, etc. 但是现在,当我在另一台机器上测试项目时,我希望具有相同的功能,特别是要查看中断位置,调用堆栈,变量值等。

What are the best ways to achieve this? 实现此目标的最佳方法是什么? Obviously a Debug build is required, what else must be transferred to the test machine? 显然需要一个Debug版本,还有什么要转移到测试机器上?

Is it only the PDB and ILK files generated during the build, or all the source code files as well? 仅仅是在构建过程中生成的PDB和ILK文件,还是所有的源代码文件?

In which case, how is VS on the test machine supposed to recognise the source files and associate them with the deployed test binaries? 在这种情况下,测试计算机上的VS应该如何识别源文件并将其与已部署的测试二进制文件关联?

And then they would need to be recopied across for every single rebuild? 然后每次重新构建都需要复制它们吗?

You can set up a source server, then the only thing you need will be copying the pdbs over, and configure the Visual Studio to use source server (see https://msdn.microsoft.com/en-us/library/ms242029(v=vs.90).aspx and https://msdn.microsoft.com/en-us/library/ms241613.aspx ) 您可以设置一个源服务器,然后只需复制pdb,然后将Visual Studio配置为使用源服务器(请参阅https://msdn.microsoft.com/zh-cn/library/ms242029( v = vs.90).aspxhttps://msdn.microsoft.com/zh-CN/library/ms241613.aspx

This article ( http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know ) has some great information of source server and PDBs. 本文( http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know )提供了一些有关源服务器和PDB的重要信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM