I followed the tutorial for setting up VisualGDB for a Raspberry Pi from this link: VisualGDB and below are some issues that I ran into and how I fixed them. Hope it helps!
Compile Error: “bits/c++config.h: No such file or directory”:
With this error, all you need to do is add the following include path to the project. You may have installed your SysGCC elsewhere but mine is the following path:
You’ll be adding the include file via VisualGDB’s project settings rather than the normal Visual Studio ones.
Right click on the project and hit VisualGDB Project Properties, go to the Makefile settings tab and add the path to the include directories.
Compiling VisualGDB with root/sudo access:
If you need to run your application with increased privileges as a super user, you’ll want to go to your VisualGDB project properties, go onto the Debug settings tab and then tick the box ‘Run debugger as root with sudo’ as seen in the screenshot below. For some reason, I had real issues attempting to log into my Pi as root, it kept telling me my password was invalid even after changing it so this was the alternative solution. You’ll need to do this if you want to make use of the GPIO ports on your Pi.