I am trying to debug my app that I just deployed to my RPi 2 using Visual Studio Remote Debugger. Does anybody have experience doing this and can point me to how to get started with it?
-
Visual Studio has a built in debbuger. Please visit the Microsoft site about Windows IoT and follow a few tutorials It is very easy. If you have found an answer please post it here or accept the best answer. Your help accepting or providing answers would be greatly appreciated.– Piotr KulaCommented Nov 2, 2016 at 9:05
-
Hi - Did you solve your problem. It seems like we not really sure what you are asking about here. Are you running Windows IoT and deploying C# app from VS .. Or are you deploying a C/C++ app to Raspbian?– Piotr KulaCommented Nov 15, 2016 at 23:10
-
I've written a Visual Studio 2019 extension that remote debugs C# code on your RPi. radutomy.github.io/2020-03-15-vsremotedebugger github.com/radutomy/VSRemoteDebugger– rtomCommented Mar 16, 2020 at 14:19
4 Answers
No need to spend money on a solution.
Download and install the Visual C++ for Linux Development extension. This tool allows you to compile / build programs on your remote Linux device. You will be using your desktop Visual Studio as an editor, file manager and debugger. No need to download anything from VisualGDB.com. Instead you will be adding some dependencies to your remote device, via
sudo apt-get install openssh-server g++ gdb gdbserver
For more details see "Visual C++ for Linux Development" and a posting I made over at StackOverflow with a couple of clarification questions.
You will be able to compile on the remote Linux (Raspberry Pi) server, run the program at either remote server via SSH or run the program from your Visual Studio. Additionally you can debug / step thru the program from Visual Studio.
Have not used, but heard this will help you do it.
-
I'm using a solution developed in C#. Correct me if I'm wrong but VisualGDB doesn't seem to be supporting that? Commented May 27, 2016 at 18:59
-
@IngeniouSeven You should mention C# in your question then. It's really demotivating for people trying to help when they answer and you say "no, that won't work because of some things I didn't bother to tell you about." Commented Oct 10, 2016 at 11:11
-
There was no reason to downvote you. I upvoted you because the original poster went missing and provided little information. Besides someobdy answered the same months afterwards. Hope you are still around @D-Ink. Commented Nov 15, 2016 at 23:11
visualGDB plugin for Visual Studio Community 2015 is the way to go.
Below video shows step by step tutorial on creating a new solution in VS with C++. Runs and executes a simple HelloWorld program remotely on Rpi and debugs locally on Windows machine.
https://www.youtube.com/watch?v=nXcUpf9gF7U
That should get you started! http://visualgdb.com/tutorials/raspberry/
-
1VisaulGDB works really well when you trying to debug, say C/C++ code running on Linux (Raspbian) but you want to use Visual Studio to debug it. I have used it before and is nice but not free.(You forgot to mention that) In this case, I assume he wrote a C# application and deployed it to Windows IoT. He can use the built in debugger to attach to C# / C++ or Python. Commented Nov 15, 2016 at 23:09
You will first need to make sure the remote debuggin is enabled in the dashboard.
Since you have already deployed the app to the Rasbperry Pi Windows IoT via Visual Studio you can simply select Debug | Start Debugging
and any breakpoints will be hit.