Giter VIP home page Giter VIP logo

dotnetwatch's Introduction

This plugin is bundled as part of Rider 2024.2 and newer.

.NET Watch Run Configuration

A .NET Watch Run Configuration (dotnet-watch) that can be used in Rider.

dotnet-watch is a .NET global tool that can track file changes during development and restart the target command. This plug-in allows users to utilize the standard features of Rider's run configuration to add a dotnet-watch quickly to any runnable project. Runnable projects include console applications, ASP.NET Core web apps, and Desktop applications. This plug-in also exposes some of the latest flags from the .NET 6 implementation of dotnet-watch, meaning not all flags are applicable if you use an SDK version before .NET 6.

Features include:

  • Project Selection
  • Target Framework Selection
  • Program Arguments
  • Working Directory
  • Environment Variables editor
  • Use External Console flag
  • Verbosity (--quiet, --verbose, or default)
  • Suppress Hot Reload (only .NET 6+)
  • Before Launch options

Plugin built by the JetBrains Developer Advocates.

Screenshots

Plugins Screen

plugins screen in JetBrains Rider

Settings

setting dialog

Running In JetBrains Rider

running in JetBrains Rider

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for ".NET Watch Run Configuration" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

dotnetwatch's People

Contributors

actions-user avatar khalidabuhakmeh avatar maartenba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotnetwatch's Issues

Add watch arguments field

Hello,

I am using the plugin for a blazor application which has several launch profiles, for the dotnet watch one could use the -lp, --launch-profile flags but if I try to add them to the Programs arguments, they get added after the -- which turns them into, as the field suggests, arguments for the child process that is being watched.

It would be helpful to have such a field to allow for more granular control of how dotnet-watch is being run, instead of adding more and more checkboxes or fields, it could be placed under an advanced grouping if you think it could confuse.

Or if this is a generic string builder sort of thing, one could even use test instead of running through such an approach.

I know it could be done via command-line but the usefulness of having it as a run/debug configuration in Rider is golden

Thank you

regression for issue #2 Unable to use hotreload with --framework flag in command line enhancement

As the title says, there is a regression for the issue #2.
The plugin started again to add the --framework parameter, breaking the hotreload functionality.

I have a global.json specifing wich version i'm using, there is no need for the plugin to add the --framework parameter, breaking the hotreload.

Imho this parameter should be added as an optin, the default behaviour should be to not add it at all.

Thank you!

Debug Configuration

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 ^^

Program Argument --applicationpath keeps getting added

Hi,

have been attempting to get Hot Reload working with Blazor was using the botnet watch plugin, and I've just figured out the issue I've been having.

Long story short, within Program arguments a --applicationpath <path-to-built-dll> keeps being added into the run configuration after a single run. I can delete it once and it works, but then next run the argument is added back in and it no longer works.

specifically, with the above argument added I get the following error (with verbose on)
Did not find a HotReloadProfile or running a non-default command. Watching with legacy behavior.
without the argument, I get
Project supports hot reload and was configured to run with the default run-command. Watching with hot-reload
which is what I want.

deleting the run argument every time is quite tedious, so I'm wondering what might be done about this.
I looked in the repository a bit and didn't notice the plugin adding it itself, so I'm not 100% certain where it's coming from.

as a note I'm on MacOS,
rider build: Build #RD-231.9161.46, built on June 22, 202
pluginversion: 2023.1.1

Thanks!

Unable to use hotreload with --framework flag in command line

Hello,
when using this plugin, the hotreload functionality for aspnetcore and blazor is not working.
Using the verbose flag i see this:
Did not find a HotReloadProfile or running a non-default command. Watching with legacy behavior.

If i launch dotnet watch manually from my terminal, everything works fine.

I noticed that adding the --framework flag breaks the hot-reload functionality in dotnet watch.

So if i try:
"C:\Program Files\dotnet\dotnet.exe" watch run --project D:/Test/Test.csproj --framework net6.0

hotreload doest not work, but with:

"C:\Program Files\dotnet\dotnet.exe" watch run --project D:/Test/Test.csproj

it works!

Maybe you can change the settings to add the --framework flag only if the user opts in, and remove it from default behaviour (so dotnet watch will take the default configured for the project).

Runtime error on 2023.3 EAP3

Sorry, it’s me again, your worst dotnetwatch nightmare 😉

I'm trying the new version in 2023.3 EAP3 but i get the following error (taken from idea.log)

My configuration is the same as the issue #7 (project with .net7)

2023-10-19 16:13:57,838 [  26060]   INFO - #c.i.e.r.ExecutionUtil - Error running 'Watch':<br>'void com.jetbrains.rider.run.TerminalProcessHandler.<init>(com.intellij.execution.configurations.GeneralCommandLine, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
com.intellij.execution.ExecutionException: 'void com.jetbrains.rider.run.TerminalProcessHandler.<init>(com.intellij.execution.configurations.GeneralCommandLine, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
	at org.jetbrains.advocates.rider.plugins.dotnetwatch.run.DotNetWatchRunConfiguration$getState$1.execute(DotNetWatchRunConfiguration.kt:120)
	at com.intellij.execution.runners.DefaultRunProgramRunner$execute$1.invoke(DefaultRunProgramRunner.kt:29)
	at com.intellij.execution.runners.DefaultRunProgramRunner$execute$1.invoke(DefaultRunProgramRunner.kt:18)
	at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:215)
	at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:213)
	at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile$lambda$2(ExecutionManagerImpl.kt:278)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:862)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:482)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1449)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:867)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.NoSuchMethodError: 'void com.jetbrains.rider.run.TerminalProcessHandler.<init>(com.intellij.execution.configurations.GeneralCommandLine, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
	at org.jetbrains.advocates.rider.plugins.dotnetwatch.run.DotNetWatchRunConfiguration$getState$1.execute(DotNetWatchRunConfiguration.kt:106)
	... 46 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.