question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How about cross-platform Edit and Continue / Hot Swap baked into the SDK tooling?

See original GitHub issue

The code, compile, reload cycle isn’t necessary, it’s just the way things are. We can make coding more interactive. Imagine a default workflow where coding is manipulating the code in a running application! That could extend beyond development, but for now at least in development.

In working on projects that use both backend builds (.NET Core) and front end builds (Webpack), I wish we could have a better development experience on the backend.

Webpack’s HMR allows me to change code and webpack’s dev server pushes those changes into the running application by replacing code, styles, html, etc. Net effect, I can make changes and instantly see the impact without losing application state, and without waiting 10+ seconds for a compilation and reload.

On the backend, as the code and dependencies grow, the time to recompile grows. Add to that: time to restart the app and possibly reload state. This becomes a huge time sink for making simple changes.

We have Edit and Continue functionality in Visual Studio, would it be possible to extract that out and put it into the SDK tooling? Maybe a dotnet edit-and-continue or dotnet hot or dotnet watch --hot?

This would then work cross-platform and with any IDE. And best of all, I can spin up a Docker container with the SDK and my web app and that’s all I need to develop anywhere.

I know work is being done to improve the build times in general, but some of that build time wouldn’t be a big deal if we had hot swap for development because then slow build times are just on initial build and on build servers.

Behavior wise, here are a few thoughts:

  • Tooling watches for changes, compiles and injects into the running app if possible.
  • If hot swap isn’t possible, then fall back to reloading the app. For example, if you change your startup code (side effecting code) that starts a web app on a given port, then that is probably not hot swappable.
  • I assume many of these things have been figured out in Visual Studio’s Edit and Continue functionality. Some sort of inspection of the changes to determine if hot swap will work.
  • IntelliJ has HotSwap, with a nice update/reload fallback. This might be a source of inspiration too https://www.jetbrains.com/help/idea/hotswap.html.
  • I would like this to work outside of debugging. I shouldn’t have to hit a breakpoint to make code changes. That might mean the debugger is always running and that’s fine if it isn’t adding too much overhead to obviate the benefits of hot swap.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
murbanowiczcommented, Nov 4, 2017

+100 for this

1reaction
tmatcommented, Jan 25, 2018

It would be nice to have this kind of feature. It’s indeed a huge undertaking. I’d recommend to file a feature request in VS user voice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Edit and Continue (Visual C#) - Visual Studio (Windows)
In Tools > Options (or Debug > Options) > Debugging > General, select or clear the Enable Edit and Continue check box.
Read more >
Edit running code with Hot Reload - JetBrains Rider
Hot Reload, also known as Edit & Continue. ... External Links .NET Tools Blog: How Rider Hot Reload Works Under the Hood.
Read more >
NET MAUI Deep Dive – Part One
Installing the Tooling Needed for .NET MAUI. Before we start diving into the code, we need to install some tools so that we...
Read more >
Unreal Engine 5.0 Release Notes
Several tools are also provided to aid your animation workflows. These include the Pose Tool, where you can save and reuse pose data...
Read more >
Untitled
Asiatic indian definition, How to make churros in an oven, Charles sturt ... Servlet api 3.1 dependency, Bloch warm up boots amazon, 2012...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found