Can't debug AMP code - c++-amp

I can't debug my AMP code.
I have:
Visual Studio 2015,
Windows 10 Home 64bit,
GeForce 660 Ti,
DirectX 12
In my C++ project I've set the 'Debugger type' to 'GPU only (C++ AMP)'
The 'Debugging accelerator type' is 'GPU - Software Emulator'
When I try to place a breakpoint in my lambda, I get the "The breakpoint will not be hit...' icon. Also, when I have code that gets the various accelerator infos, they all have 'is_debug=false'--including the 'direct3d/ref' accelerator and the GeForce 660Ti accelerator.
I've also tried specifically setting the default accelerator to direct3d_ref, but of course i think the problem is that it doesn't have debug, anyway.
What gives?

I've got the same situation.
One hint I found: https://msdn.microsoft.com/en-us/library/hh265136.aspx
"Supported Platforms
Debugging is supported on Windows 7, Windows 8, Windows Server 2008 R2, and Windows Server 2012. For debugging on the software emulator, Windows 8, or Windows Server 2012 is required. For debugging on the hardware, you must install the drivers for your graphics card. Not all hardware vendors implement all debugger features. See the vendor documentation for limitations."
From this, I gather that perhaps AMP debugging is not supported on Windows 10. Or perhaps the documentation is out of date.
It makes sense: AMP is made by Microsoft, but Windows 10 is made by Microsoft, so one would not expect them to be compatible. :)
Before I go back to Windows 8.1, I'd like to know for sure....

Another hint for this: When trying to debug I saw a debug output message saying "Please use the /DEBUG:FULL linker switch to hit breakpoints in C++ AMP code."
After changing the linker settings debugging worked for me.

Is your lambda function a c++/amp restricted Function?
It should be so, otherwise the GPU debugging has no permission to enter a c++ restricted code section.
Maybe that is why you get the:
"The breakpoint will not be hit..."
for more information read:
https://msdn.microsoft.com/en-us/library/hh873133.aspx
Of course a code example would be nice.
to try it out on a different machine.

Related

Cannot find Arduino IDE path. In Visual Studio Code

I wants to use Arduino in vs code Visual Studio Code.
I installed arduino IDE on my local machine on C:\Program Files\Arduino IDE I also added arduino path my Visual Studio Code's setting .json
"arduino.path": "C:\\Program Files\\Arduino IDE",
setting .json
I am using arduino extension.
This is the pic of extension
Any suggestion or recommendations would greatly aid me. I've been struggling to find a solution for this problem for 6 hours.
This was giving me issues for the longest time, too. It seems that the Arduino 2.X IDE doesn't work well with VSCode.
To resolve, use the legacy IDE (Arduino 1.8.X). First, uninstall the 2.X version of Arduino. As of February 2023, you can download the legacy version by going to the Arduino Downloads page and scrolling down to the "Legacy IDE (1.8.X)" section. There's a few different download options. I opted for the one labeled "Windows Win 7 and Newer" since it's a neatly contained executable to install Arduino.
From here, run the executable and install normally. I also reinstalled the Arduino plugin in the Visual Studio marketplace (not sure if necessary, but it doesn't hurt). There's at least three places you could potentially enter the arduino.path:
The one in YOUR PROJECT FILEPATH/.vscode/settings.json
The one in the VS Code User Settings (File>Preferences>Settings> User tab> Search for arduino.path in the search bar)
Same as above, but on the "Workspace" tab instead of "User"
For me, leaving all three empty worked fine. I believe that's because the installer added Arduino to the Windows Path variable. Here's a related post, though, where someone had to configure the path variable in case that doesn't work for you.

Windbg under XP Sp3 cant find symbols and nowhere to download

I try to do some basic learnings for exploit dev, so I setup a Win XP SP3 machine, installed WinDbg for XP from here:
http://www.codemachine.com/downloads.html
I set Symbols path to:
srv*c:\symbols*https://msdl.microsoft.com/download/symbols
Then I simply start to debug Windows Media Player wmplayer.exe
When I try to show the !peb, I always get the message that my
Debugger is not using the correct symbols.
Any idea ?

Powershell ISE NOT found in Windows Server 2012

i am not able to see the powershell ise application in my windows serevr 2012 OS,Search window .
Below is the screenshot of my issue:
Whats wrong with my OS? Does anything is corrupted?
[ps-ise][1]
[powershellisenotfound][1]
Try to enable powershell via following steps. Open PowerShell Window, and type the following commands:
Import-Module ServerManager
Add-WindowsFeature PowerShell-ISE
For more details see this msdn link.
As far as I know PowerShell ISE is not enabled for WIN server operating systems. Reason: WIN 2012 is designed for headless usage in clouds. Therefore it won't make sense to enable GUI based PowerShell ISE.
I know it's late for the original poster, but it's available to be added as a Feature in the Server Manager. Go to Programs and Features --> Turn Windows features on or off --> Expand Features (in the left pane) --> Add Features (upper right) --> Check the appropriate box in the Add Features Wizard and install.
Note: It's called Windows PowerShell Integrated Scripting Environment (ISE) so it's down in the "W" section and not "P".

How can I disable GPU rendering in Visual Studio Code

I'm with bad rendering issues... Seems that the Visual Studio Code window do not clean a screen area before redraw it. The same thing happens here with chrome browser, but in chrome I can start it with " --disable-gpu-rendering " and it goes well.
How can I disable GPU rendering in Visual Studio Code ?
I'm thinking it's a hardware specific problem, and I'm looking for a other way to solve it too.
May be useful know my hardware:
Machine: Notebook dell vostro 3500 (intel chipset)
CPU: Intel i5
RAM: 8G
linux kernel: 4.0
video graphics: intel i915 (latest)
X -version: X.Org X Server 1.14.0
Note that VSCode 1.40 (Oct. 2019) proposes an alternative to the parameter/flag --disable-gpu:
Disable GPU acceleration
We have heard issue reports from users that seem related to how the GPU is used to render VS Code's UI.
These users have a much better experience when running VS Code with the additional --disable-gpu command-line argument.
Running with this argument will disable the GPU hardware acceleration and fall back to a software renderer.
To make life easier, you can add this flag as a setting so that it does not have to be passed on the command line each time.
To add this flag:
Open the Command Palette (Ctrl+Shift+P).
Run the Preferences: Configure Runtime Arguments command.
This command will open a argv.json file to configure runtime arguments.
You might see some default arguments there already.
Add
"disable-hardware-acceleration": true
Restart VS Code.
Note: Do not use this setting unless you are seeing issues!
Note that Gilbert points out in the comments to "How To Fix Screen Flickering Issue On Mac, MacBook, And iMac" from Preeti Seth.
Gilbert adds:
I fixed the problem by disabling automatic graphics switching on my macbook pro.
The setting is located in system preferences -> battery.
It worked!
Under Windows, I can confirm that launching VSCode with --disable-gpu does not create a GPU process:
C:\Users\alex\AppData\Local\Code\app-0.1.0>Code.exe --disable-gpu
Perhaps the same flag works on Linux too?
On Ubuntu, the file to edit is /usr/share/applications/code.desktop.
Change:
Exec=/usr/share/code/code --unity-launch %F
to:
Exec=/usr/share/code/code --disable-gpu --unity-launch %F
For Windows users
Visual studio code is based on chrome, to make it work you'll have to disable hardware acceleration.
Add --disable-gpu --disable-gpu-compositing to the vs code shortcut on your desktop.
Example:
"C:\Program Files (x86)\Microsoft VS Code\Code.exe" --disable-gpu --disable-gpu-compositing
Inside settings.json you can write this:-
"terminal.integrated.gpuAcceleration": "off"
on Mac running in virtualbox you can edit the file in ~/.vscode/argv.json
Add
"disable-hardware-acceleration": true
macOS users can try the following commands in the terminal :
Goto Applications folder :
cd Applications
Open VS Code with GPU Disabled :
Visual\ Studio\ Code.app/Contents/MacOS/Electron --disable-gpu
Note : You might need to supply sudo with second command.
On Linux Mint I had to right click the lower left mint button, then choose configure, then press the menu button. Then press the "Open Menu Editor" button and find Visual Studio Code in the programming group. Click properties and find the command field. There you can set the --disable-gpu option.
If environment variables are mapped correctly, you can simply use cmd.exe to start an instance of code with --disable-gpu . See the screenshot. enter image description here
Sometimes the problem is caused by automatic graphic switching as the computer tries to save energy.
In my case my macbook pro has battery problems so they manifested as the screen flickering whenever I ran an intensive application like vscode.
To disable automatic graphic switching, go to system preferences -> battery and untick Automatic graphic switching.
Refer to this guide: https://wethegeek.com/how-to-fix-screen-flickering-issue-on-mac-macbook-and-imac/

WinDbg is not loading my symbol files

I'm writing a Kernel mode usb-driver primary for Windows Vista 32bit but hopefully it will also be able to be builded for Win XP, Win Vista, Win 7 32 and 64 bit.
Anyway, I'm debugging from an Windows 7 32bit laptop to a Windows Vista 32bit laptop (the target). The laptops are connected via Firewire and the connection seams to be ok since I can set some breakpoints and step trough parts of my code. All information is in assembly though and WinDbg says "Your debugger is not using the correct symbols..." when I hover over an function in my driver.
Symbol file path is:
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols;C:\Me\MyDriver\objchk_wlh_x86\i386
Source file path is:
C:\Me\MyDriver
Everything is newly compiled but WinDgb still won't accept my symbol files. Why?
If you can set breakpoints and step through your code it sounds like your symbols are fine. You can try:
!itoldyouso mydriver
If you want the debugger to convince you that your symbols are OK.
I never use the hover feature in the GUI, but it's entirely possible that it just doesn't work properly in some cases.
-scott