DotNetWatch icon indicating copy to clipboard operation
DotNetWatch copied to clipboard

Debug Configuration

Open lucasmpr opened this issue 1 year ago • 3 comments

Hello!

I was wondering if we could enable the "Debug" button in this plugin.

I know that debug doesn't work with dotnet-watch, but it would be better for the flow to just have the button there even if it doesn't actually "watches".

So when "running" without debug we can get the watch behavior and but still being able to debug ^^

lucasmpr avatar Jan 31 '24 05:01 lucasmpr

That would be misleading - Rider differentiates between run and debug, so I think it's not right for the plugin to show the button.

maartenba avatar Jan 31 '24 06:01 maartenba

What I wanted was a way to launch debug without having to select another run configuration for the same project.

Let me try to explain why I think it's important.

What I usually end up doing now is the following:

  1. I turn on watch and select "Watch Api"
  2. I'm developing my feature, reloading is working.
  3. I notice my feature is not working as intended
  4. I stop the project, select "Debug Api" in the drop-down and then press the debug button
  5. Debug my feature
  6. Never turn on watch again and keep restarting the application manually.

I'm hoping that without having to select the project in the drop-down it will be easier to switch in and back. We have multiple projects and turning on debugging breaks the workflow because I need to find another configuration from the dropdown.

I understand that it would be misleading to put a feature that doesn't really work, but it could be an opt-in feature to "redirect" debug to another run configuration

lucasmpr avatar Jan 31 '24 11:01 lucasmpr

That would make it confusing for folks with more than 2 run configurations.

But good news: there's a shortcut that can help! Not the exact request you have, but it's helpful nevertheless.

Not sure if you are on macOS/Windows and which keymap, but try double-shift (works everywhere), search for "run", and then actions. The item here show show you a shortcut for quicker access:

image

When you get there, it's easy to pick the configuration to Run. To debug, hold shift and select an item.

maartenba avatar Jan 31 '24 14:01 maartenba