Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorder options and subcommands to show alphabetically #1075

Open
waldekmastykarz opened this issue Mar 21, 2025 · 8 comments
Open

Reorder options and subcommands to show alphabetically #1075

waldekmastykarz opened this issue Mar 21, 2025 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers work in progress

Comments

@waldekmastykarz
Copy link
Collaborator

When you run devproxy -h it shows the list of available options and subcommands. Both, are displayed in the order they're registered rather than alphabetically which complicates the lookup. Let's change the order to be alphabetical.

Image
@waldekmastykarz waldekmastykarz added enhancement New feature or request good first issue Good for newcomers help wanted We'd appreciate your help labels Mar 21, 2025
@caiovlima
Copy link

Can I handle this ?
But, I've some issues when try to debug solution.
I got a forked, cloned and try dotnet run build, no errors show but.

@waldekmastykarz
Copy link
Collaborator Author

Awesome! Please do! What kind of issues do you have?

@waldekmastykarz waldekmastykarz added work in progress and removed help wanted We'd appreciate your help labels Mar 23, 2025
@caiovlima
Copy link

caiovlima commented Mar 24, 2025

I started by installing Dev Proxy on my local machine using the link:
Docs
As you can see in the image, the Dev Proxy options are displayed.

Image

Next, I forked the project and cloned it into my local environment.
I opened the project solution using Visual Studio, created a feature branch, and built the application.

However, I’m unable to debug it.
When I run the application, the following terminal appears.

Image

Image

I know where the commands and subcommands for Dev Proxy are registered, but I want to see them when running my application. This way, I can change the order in which commands and subcommands are created and observe the results.

I have .NET versions 6, 8, and 9 installed.

Long Story Short:
How can I view the options from devproxy -h based on the application running from my development environment, rather than the configuration set on my machine?

@waldekmastykarz
Copy link
Collaborator Author

You mentioned that you installed Dev Proxy first before you cloned the repo. I think what's happening, is that you're starting the installed version rather than the version from the cloned repo. I suggest that you uninstall Dev Proxy, then build it and start the version from the build output folder.

@caiovlima
Copy link

@waldekmastykarz
I uninstalled DevProxy, ran dotnet build, and verified the build output folder.

Image

I thought the .exe I should execute is this one, correct?

Image

It opens a terminal and indicates the local address to access, but when attempting to access it, an error is displayed.

Image

Image

@waldekmastykarz
Copy link
Collaborator Author

All is working fine! Dev Proxy is not a website you can access in a browser. You use it similarly to Fiddler where you configure it as a proxy on your machine and which the intercepts web requests from the applications.

@caiovlima
Copy link

Got it! I know I need to change those lines to sort alphabetically.
Here’s the link: https://github.com/dotnet/dev-proxy/blob/main/dev-proxy/ProxyHost.cs#L338

Once I’ve done that, I just want to make sure my changes actually worked. After building, how can I check it?

@waldekmastykarz
Copy link
Collaborator Author

After you build your project, run devproxy -h. Options and subcommands should show alphabetically sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers work in progress
Projects
None yet
Development

No branches or pull requests

2 participants