Attach to process
JetBrains Rider provides a way to attach the debugger to both local and remote processes.
The steps to attach to a process depend on how and where the process was launched.
First off, if you want to debug a program that can be started from JetBrains Rider, the best way to do so is to start a local debugging session.
Attach to a local process
Press Ctrl+Alt+F5 or choosefrom the main menu.
JetBrains Rider will show the list of the running local processes. Select the process to attach to.
If necessary, narrow down the list of processes by typing the first letters of its name or PID.
If you don't have sources of the target .NET or .NET Core process, you can still attach to it either as described above or by clicking Attach to Process on the Welcome screen, right after you start the IDE. JetBrains Rider will automatically load and decompile all assemblies from the process.
Attach to a remote process
Debugging a remote process (usually, a Web application running on a remote host), is a completely different scenario, which requires setting up the debug agent on the remote host and configuring the connection before actually attaching to the target process. All those steps are described in the Debug remote applications via SSH tutorial.
Detach from a process
The procedure to detach from a remote process is the same as for stopping a local debug session, however, the effect is different. When you detach, the debugging session closes but the process continues to run.
Click the Stop button on the main toolbar on in the Debug window.
Alternatively, click Stop on the main toolbar or press Ctrl+F2, then select the session to be closed.