dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.93k stars 4.02k forks source link

Have option to just open CS code instead of asking to open CS or generated CS code #74502

Open vsfeedback opened 2 months ago

vsfeedback commented 2 months ago

This issue has been moved from a ticket on Developer Community.


While editing code, I like to F12 to other code. But when using something like Community Toolkit, I'm always asked to goto a CS or a generator created CS file.....almost never (aka 100% but can see maybe one in a million times I COULD want the generated one...maybe) do I want to goto the generated one. I would LOVE to have either the ability to goto the CS code, or a tools\options\preferences to goto the CS over the generated file.

image.png


Original Comments

Feedback Bot on 7/16/2024, 11:54 PM:

(private comment, text removed)

phenry9999 commented 2 months ago

Thank you for adding this here. I hope I can enjoy this soon. Thank you.

CyrusNajmabadi commented 2 months ago

We've gotten the opposite feedback a ton. Specifically because people want to see what was actually generated. We provide both so that both categories of users can get to the info they are interested in :)

phenry9999 commented 2 months ago

re many want both? Curious.

Hence the suggestion for having something in Tools\Options to allow for people like me who are focusing on my code. Or maybe have the options repoint F12 to goto the non-generated source? I would love to write an extension addin but I don't know enough about VS to do that. :<

CyrusNajmabadi commented 2 months ago

Yes. in my domain i almost always want the generated file. And source side is simple scaffolding that drives the interesting side (the generated part). Navigation through the different parts is possible with the nav bar. but i def have times i want/need both.

phenry9999 commented 2 months ago

What I'm asking for is an easier way to navigate to the code, especially using the keyboard. Currently I need to use the keyboard and mouse. Not ideal, but two keyboard shortcuts would suffice, but even better, would be an option to simply do what I expect, what is expected from VS, open the code I'm searching for. I don't often see someone searching for someone else's generated code. Not saying it doesn't happen, just saying, I would like to search for my own code and open it through the F3, F8, F12 or what ever keyboard short cut is necessary. Requiring to look and click distracts from the objective, to edit the code.

Obviously we don't agree on this. And that's fine. I do think having a tools\options is the best answer to give us both what we desire.

CyrusNajmabadi commented 2 months ago

F8 should navigate between the results.

phenry9999 commented 2 months ago

I did try the F8, thank you. It does help. F12, then F8. Just have to get used to it. Don't know why I didn't think of trying that?! :< Thank you for the tip to try and worked. :>

CyrusNajmabadi commented 2 months ago

You're welcome!