简体   繁体   English

Visual Studio发布配置文件及其配置

[英]Visual studio publish profiles and its configurations

I'm trying to get a better understanding of visual studios build configurations. 我试图更好地了解Visual Studio的构建配置。

I'm currently building out a webAPI. 我目前正在构建一个webAPI。 I am also using team city for some automated build tasks and so I use a different profile for that instead of the debug profile that I use locally. 我还将Team City用于一些自动化的构建任务,因此我为此使用了其他配置文件,而不是本地使用的调试配置文件。 This team city profile also has its own configuration (I'm using it for transforms). 该团队城市资料也有其自己的配置(我正在使用它进行转换)。 Because I use this configuration, I am unable to attach to it (it has error I can't reproduce locally). 因为我使用此配置,所以无法附加到它(它有错误,我无法在本地复制)。

Is there a way to use a custom configuration while building out all the symbols and debug data that the debug configuration has so I can still attach. 在构建调试配置所具有的所有符号和调试数据时,有没有一种使用自定义配置的方法,因此我仍然可以附加。 I've tried finding more information by searching but I can't seem to find the right info I'm looking for. 我尝试通过搜索找到更多信息,但似乎找不到合适的信息。 Perhaps a cleaner explanation of profiles and configurations would help. 也许对配置文件和配置进行更清晰的解释会有所帮助。

If I correctly understand your question you want to enable debugging symbols in a build configuration other than Debug . 如果我正确理解了您的问题,则想在除Debug之外的构建配置中启用调试符号。

To achieve that, right click on your project, open its Properties , and switch to the Build tab: 为此,请右键单击您的项目,打开其Properties ,然后切换到Build选项卡:

在此处输入图片说明 There you can tick the checkbox to Define DEBUG constant and untick Optimize code which should enable you to properly debug your build even when using a build configuration that's not Debug . 在这里,您可以勾选“ Define DEBUG constant ”复选框,并取消勾选“ Optimize code ,即使使用了不是Debug的构建配置,也应该使您能够正确地调试构建。

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

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