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.

bug in hot reload

See original GitHub issue

Hot reload does not set the DEBUG flag. See example below. On change of any file in the project, hot reload kicks in causing Foo to get recreated but logic doesn’t go through if DEBUG, writes RELEASE to the console and Bar is set to null.

public class Foo
{
    static readonly string Bar;

    static Foo()
    {
#if DEBUG
        Console.WriteLine("DEBUG");
        Bar = "Testing 123";
#else
        Console.WriteLine("RELEASE");
        Bar = null!;
#endif
    }
}

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adospacecommented, Jun 15, 2023

Hi, sorry, but can’t look at the issue before Wednesday next week, hopefully it is not a problem for you

0reactions
Code-DJcommented, Jun 15, 2023

UPDATE: Tried both options, still shows RELEASE.

Looks like it is being built in debug mode but the DEBUG constants is not being set DefineConstants. Visual Studio automatically does this for us. May be we need to pass it here?

https://github.com/adospace/reactorui-maui/blob/39cb1de97f918854b895a4909d2dcc709cdba55d/src/MauiReactor.HotReloadConsole/HotReloadClientEmit.cs#L55

{ "DefineConstants", "DEBUG;TRACE" }

or is it?

{ "DebugSymbols", "true" }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Hot Reload on Visual Studio 2022
I was blaming VS for un-functional Hot Reload, but in my case it was caused by trying to Debug ( F5 ) and...
Read more >
Hot reload
Flutter's hot reload feature helps you quickly and easily experiment, build UIs, add features, and fix bugs. Hot reload works by injecting updated...
Read more >
[Bug]: Live Reload not working. #1601 - remix-run/remix
I still have not found a solution other than it the hot-reloading it working on my Linux machine but refuses to work on...
Read more >
Write and debug code by using Hot Reload - Visual Studio ...
You can configure Hot Reload by selecting Settings from the Hot Reload drop-down button. Or, open Tools > Options > Debugging > ....
Read more >
Hot reload buggy sometimes? - Blueprint
Basically, hot reload reloads your modules, but it doesn't always do it properly. Some functions pointers aren't updated and so on. Just don't ......
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