Contextual keymaps in Rider
Asked Answered
L

1

7

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.

Laylalayman answered 28/2, 2021 at 22:53 Comment(2)
tkit, you found any solution or work around, it is really annoying..Flutter
@UttamUghareja Unfortunately no. I had to get a bit creative with how I arranged my shortcuts so nothing overlaps now. If you have an advanced keyboard that supports "layers", that could help a bit, but I assume most people don't and it's not really a Rider solution, more of a workaround..Laylalayman
I
11

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.

Intelsat answered 24/11, 2021 at 17:34 Comment(3)
That's genius and this was driving me nuts.. Take my gold! :D Thanks a lot.Laylalayman
I am glad that searching "rider f5 behavior sucks" lead me to this answer. This is such a weird default behavior for an IDE.Krypton
This is not convenient at all.Cajun

© 2022 - 2024 — McMap. All rights reserved.