none
Debug C++ AMP on UWP app

    Question

  • Hello,

    I have a GPU accelerated UWP APP that is composed by a C# app and a C++/CX Windows Runtime Component that use C++ AMP.

    I can not debug GPU because in the C++ project properties there isn't Debugging sheet.

    How can I debug C++ AMP kernels?

    Thank you

    Saturday, May 5, 2018 11:16 AM

All replies

  • I found a bug in Windows 10 1803 / VS2017 15.7.1 that allow debug of C++ in UWP apps:

    1) Set debugger type of UWP app to Native Only, Mixed mode doesn't works for GPU debugging at this time

    2) In C++ Amp project set the Linker Generate Debug Info to /DEBUG:FULL, this is required do debug C++ AMP

    3) Before using C++ Amp add the code:

    accelerator::set_default(L"direct3d\\warp");

    to use reference warp software accelerator by default

    4) Set a breakpoint on the first instruction of C++ AMP code and debug with F5

    Also if debug is not stable I hope that this will help

    PS: See https://developercommunity.visualstudio.com/content/problem/149542/unable-to-debug-on-gpu-since-windows-10-1709.html for non-uwp debugging



    • Edited by tazzo Thursday, May 10, 2018 10:44 AM
    Thursday, May 10, 2018 10:35 AM