locked
How to enable C++ Project System Tracing in VS2015 ? RRS feed

  • Question

  • Hi,

    I came across this article and I tried it with VS2015 and it doesn't work.  It does work with VS2013.

    https://blogs.msdn.microsoft.com/andrewarnottms/2012/06/07/enable-c-and-javascript-project-system-tracing/

    The reason I want this, is to help me diagnostics why some projects are not considered up to date.

    How can I enable this diagnostic log in VS2015 ?

    Regards,

    Eric Bouchard


    Tuesday, October 13, 2015 2:14 PM

Answers

All replies

  • Hi ericbouchard,

    In Visual Studio 2015, we can view the build log file for C++ project in following path. It will log all build information which we configured in Tools.
    \...\Visual Studio 14.0\Projects\ProjectName\ProjectName\Debug\ProjectName.txt

    If you want to log detailed information, such as diagnostic information, please set with following steps.
    1.Tools -> Options.
    2.Select "Project and Solution" tab and choose the "Build and Run".
    3.In the "MSBuild project build output verbosity" list, choose the option that you want. Following explains for every option.
    Quiet
    Displays a summary of the build only.
    Minimal
    Displays a summary of the build and errors, warnings, and messages that are categorized as highly important.
    Normal
    Displays a summary of the build; errors, warnings, and messages that are categorized as highly important; and the main steps of the build. You'll use this level of detail most frequently.
    Detailed
    Displays a summary of the build; errors, warnings, and messages that are categorized as highly important; all of the steps of the build; and messages that are categorized as of normal importance.
    Diagnostic
    Displays all data that's available for the build. You can use this level of detail to help debug issues with custom build scripts and other build issues.

    Best Regards,
    Weiwei

    • Proposed as answer by Alfred Theorin Thursday, February 25, 2016 7:58 AM
    Wednesday, October 14, 2015 8:33 AM
  • Hi Weiwei,

    I already tried the MSBuild project build output verbosity and it does not suit my needs.

    When a C++ project has a missing input, The project is never up to date.
    For example I add a new .h file and then delete the file from the disk without modifying the project.
    Try to build the project several times, it will never be up to date.

    There is no mention of the missing file in the MSBuild project build output (either Detailed or Diagnostics).
    Only mention is: Source compilation required: input C:\TEST\TEST.OBJ is newer than output C:\TEST\DEBUG\TEST.PDB. (TaskId:31).
    Which is not really helpful.

    With the CPS logging enabled on VS 2013, as shown in the link I posted, there is a trace in the log saying the project is not because a file is missing (including the full path of the missing file).

    This is why I ask if there is a way to generate this log with VS2015.

    Wednesday, October 14, 2015 6:52 PM
  • Please refer to following article. It introduce how to create, initialize and configure trace switches in .NET Framework 4.6 and 4.5. I thinks it is applicable for Visual Studio 2015. Hope that helps.

    https://msdn.microsoft.com/en-us/library/t06xyy08(v=vs.110).aspx


    • Edited by WilliamAAA Monday, October 19, 2015 12:54 AM Modify the link
    Thursday, October 15, 2015 9:10 AM
  • Hi Arno,

    The link does not work. I get the following error:
    We're sorry, the page you requested cannot be found.

    I think you have a typo in the url.  If I remove the 'c' at the end it works

    https://msdn.microsoft.com/en-us/library/t06xyy08(v=vs.110).aspx




    • Edited by ericbouchard Thursday, October 15, 2015 4:25 PM
    • Proposed as answer by Weiwei Cai Tuesday, October 20, 2015 5:03 AM
    • Marked as answer by Weiwei Cai Wednesday, October 21, 2015 4:44 AM
    Thursday, October 15, 2015 4:14 PM
  • Sorry for my error.

    Is this link helpful? If yes, please mark it as answer. Thank you.

    Monday, October 19, 2015 12:56 AM
  • @WeiWei:  MSBuild verbose logging is not a replacement for CPS logging. In my case MSBuild often spews something uninformative like 'Project is not up-to-date because last build was with unsaved files'. We still need the old CPS logging apparatus. Is it still available in VS2015?
    Tuesday, July 5, 2016 10:56 AM
  • Hi OfekShilon,

    Since this thread has been closed by a long time, I suggest you create a new thread to describe your problem detailed on our forum, which can let other communities to help you.

    Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 6, 2016 1:32 AM