共用方式為


Remote GPU Debugging in Visual Studio 11

Hi my name is Paul Maybee and I am the architect on the Parallel and GPU debugger team, working closely with the C++ AMP team.

We covered previously how to debug C++ AMP code locally, so please read our post on “Start GPU Debugging in Visual Studio 11”. I’ll pick up from step 6 for those of you not wanting to run Windows 8 Consumer Preview on your main development machine.

This post contains the steps necessary to debug a C++ AMP program on a remote host running Windows 8 from a local machine on which you have installed Visual Studio 2012 RC.

For the purpose of these instructions I will make the following assumptions:

  1. The remote machine is named WIN8REMOTE.
  2. The local machine is running a 64 bit operating system.
  3. The location \\WIN8REMOTE\C$\temp is writable from the local machine. 
  4. Visual Studio is installed at “c:\Program Files (x86)\Microsoft Visual Studio 11.0”
  5. The application to be debugged is HelloWorld_AMP.exe found in “%USERPROFILE%\documents\visual studio 11\projects\HelloWorld_AMP\Debug”, built for Win32.  

If these assumptions don’t exactly match your setup then make corresponding changes to the instructions below.

Step 1: One time setup of WIN8REMOTE for remote debugging

  • Install the Windows SDK on WIN8REMOTE.
  • Copy the contents of “c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x86\” to \\WIN8REMOTE\c$\temp\debugger.
  • Log on to WIN8REMOTE and run c:\temp\debugger\msvsmon.exe. When the firewall dialog box comes up allow it to “Configure remote debugging”. 

     Step 2: Configure your project properties for remote debugging

  • Select Project->Properties to open the properties dialog and then Configuration Properties ->Debugging as per screenshot that follows
  • Set “Debugger to launch” to “Remote Windows Debugger”
  • Set “Remote Command” to “c:\temp\HelloWorld_AMP\HelloWorld_AMP.exe” 
  • Set “Working Directory” to “c:\temp\HelloWorld_AMP\”
  • Set “Deployment Directory” to “c:\temp\HelloWorld_AMP\”
  • Set “Remote Server Name” to “WIN8REMOTE”
  • Set “Debugger Type” to “GPU Only”

       

Step 3: Start debugging

  • Set a breakpoint on line 11 (“av[idx] += 1;”).
  • Press F5 and enjoy

       

That’s all! If you have any questions, please feel free to ask in the comments section below.

Comments

  • Anonymous
    August 16, 2012
    So, has this problem been solved? Is it now possible to debug on Win7?

  • Anonymous
    August 16, 2012
    Hi Dmitri, sorry, there has been no change in this area. We'll make a new blog post if something changes...

  • Anonymous
    October 16, 2012
    Really no change? How many people are honestly going to bother if they have to install win 8 as no one working on GPU acceleration will update to Win8 until we are sure it is stable plus most companies aren't going to allow us to update or even use a Win8 VM until it is approved which will be a year at least.? This is ridiculously as you guys have known about it for so long and still no resolution and win8 is already RTM

  • Anonymous
    October 29, 2012
    Hi Jim, Thanks for your feedback. We do acknowledge the need for debugging support in Windows 7 and when we mitigate that hindrance, we will definitely have a blog post on the topic. Thanks

  • Anonymous
    November 12, 2012
    Wow MSFT... took you only 9 Month to figure out that you will be doing nothing at all: social.msdn.microsoft.com/.../774a19a5-4bf4-42dd-bee7-4cf2a74bfdb6

  • Anonymous
    November 15, 2012
    Gave is right 9 months really? I thought MS was serious about the success of Amp but this really shows they aren't. This isn't DirectX vs OpenGL. There is actual real compition like OpenCL and CUDA. This lack of support has removed my enthusiasm for what wasn't really anything particularly special.

  • Anonymous
    November 30, 2012
    Hi, Checking for an update on this. Thank you

  • Anonymous
    February 05, 2013
    Hi everyone, In case anyone missed it, couple of days ago, we announced the availability of GPU debugging support in Windows 7. The following post has more details blogs.msdn.com/.../c-amp-gpu-debugging-now-available-on-windows-7.aspx