Remote debugging comes to Rider 2018.3!
The latest Rider 2018.3 Early Access Preview (EAP) build brings remote debugging of .NET, .NET Core and Mono applications! By setting up an SSH connection, we can attach to a running process on a remote machine and step into code.
Better even, remote debugging works across platforms! For example, we can debug a .NET application running on a remote Linux machine, from our Windows box. Let’s see how this works.
Connecting the debugger to a remote server over SSH
With Rider 2018.3, it is now possible to debug a .NET, .NET Core or Mono application that is deployed on a remote machine. From the Run | Attach to Remote Process… menu, we can enumerate processes on a remote server, by connecting to it over SSH.
Of course, we will first have to set up such connection, which can be done from Rider’s settings under Build, Execution, Deployment | Debugger | Remote debug. We can also add a remote host the first time we use Run | Attach to Remote Process… Authentication with a remote host can be done using a password, an OpenSSH / Putty key pair, or using an OpenSSH configuration file and authentication agent.
The first time we now use the Run | Attach to Remote Process… action, Rider can connect to the remote machine and fetch a list of running processes. To do that, it requires the remote debugger tools to be uploaded and extracted on the machine, which can be done automatically.
Note that when the
unzip tool is installed on the remote machine, Rider will compress (and extract) the remote debugger tools to increase transfer speed.
Once we select a remote process, Rider will attach the debugger to it and allows us to pause execution, place breakpoints, inspect variables, and so on.
Once the remote debugger tools have been loaded first time, connecting to a remote host becomes much easier. Again using the Run | Attach to Remote Process… action, Rider now immeditaly lists remote processes and lets us attach to them:
Once we select a remote process, Rider will attach the debugger to it and allows us to pause execution, place breakpoints, and so on.
Other debugger updates
Next to adding support for remote debugging, we have made a number of bugfixes and improvements to the debugger:
- We added a new expression evaluation engine, which lets us use the latest C# syntax in debugger watches.
- When inspecting variables, the context menu now lets us switch between decimal and hexadecimal for numeric values.
- Support of pointer operations (arithmetic, derefencing) in watches for .NET, .NET core, Mono and Unity 2018.3+ (when the new runtime is used) is coming in the next EAP build
Download Rider 2018.3 EAP and give it a try! We’d love to hear your feedback!
Subscribe to Blog updates
Creating Custom AI Prompts
AI has swept through the software development industry like a wildfire. So people want to learn how to best use AI in their day to day tasks. In this post we’ll take a look at how to write custom prompts for use with the JetBrains AI Assistant in ReSharper and Rider so you can make the most of AI.&n…
12 Debugging Techniques In JetBrains Rider You Should Know About
Twelve must know debugging features in JetBrains Rider every developer should know.
Interceptors – Using C# 12 in Rider and ReSharper
Welcome to our series, where we take a closer look at the C# 12 language features and how ReSharper and Rider make it easy for you to adopt them in your codebase. If you haven’t yet, download the latest .NET 8 SDK and update your project files! In this series, we are looking at: Primary …