Search code examples
keyboard-shortcutsriderkeymapping

Contextual keymaps in Rider


Is it possible to create contextual keymaps (shortcuts) in Rider?

For example, in VS, F5 is the shortcut for "run in debug mode". Then if you put a breakpoint and it hits, while you're in the debug mode, F5 will let go and "resume" the execution of the app.

But in Rider it seems like I can't accomplish this - I don't see a way to map F5 to "Resume" only when I'm attached to the application process. If I map both "Run in debug mode" and "Resume" to F5 in keymappings, and the breakpoint hits, if I press F5 to resume, it will instead stop the process, rebuild, run and attach again.

I checked how they envisioned this to work, and they actually mapped Alt + F5 to "run in debug mode" and F5 to "resume". But I'd prefer it if I could avoid the Alt bit.

Is what I'm looking for possible with Rider, and if so - how?

Thank you.


Solution

  • To achieve the same behavior as in Visual Studio you simply need to remove a shortcut from the "Debug" action and leave it on "Resume Program".

    Now you can press F5 and Rider will automatically run a project in the debug mode.