PeterPanettone 157 Posted October 25, 2021 Hot Reload is a feature in the upcoming .NET 6 that allows developers to modify source code while an app is running and immediately see the results: Microsoft reverses controversial .NET change after open-source community outcry Just pipe-dreaming: Wouldn't that be a wonderful feature for Delphi? 1 Share this post Link to post
Lars Fosdal 1792 Posted October 26, 2021 It would be a nice feature, but it is pretty unlikely to ever happen. The .NET platform is very, very different from Win32 on Intel. The ancient Borland Pascal DOS debugger had backstep, where you could single-step backwards from a breakpoint. Also not quite as easy in the multithreaded, asynchronous world of Windows. Share this post Link to post
David Heffernan 2345 Posted October 26, 2021 14 hours ago, PeterPanettone said: Hot Reload is a feature in the upcoming .NET 6 that allows developers to modify source code while an app is running and immediately see the results: Microsoft reverses controversial .NET change after open-source community outcry Just pipe-dreaming: Wouldn't that be a wonderful feature for Delphi? Great to see that MS has done the right thing here, although disappointing that it took so much pressure to make it happen. Good on El Reg for their reporting on this. Never ever going to happen for Delphi though!! Share this post Link to post
Uwe Raabe 2057 Posted October 26, 2021 18 minutes ago, Lars Fosdal said: The ancient Borland Pascal DOS debugger had backstep, where you could single-step backwards from a breakpoint. The current debugger lets you simply drag the execution pointer to a line before or after the current position: 2 Share this post Link to post
Fr0sT.Brutal 900 Posted October 26, 2021 1 minute ago, Uwe Raabe said: The current debugger lets you simply drag the execution pointer to a line before or after the current position: Nice! I was always using RMB>Debug>Set next statement Share this post Link to post
Stefan Glienke 2002 Posted October 26, 2021 They cannot even build a stable debugger - how could they ever achieve this. 1 Share this post Link to post
Anders Melander 1783 Posted October 26, 2021 26 minutes ago, Uwe Raabe said: The current debugger lets you simply drag the execution pointer to a line before or after the current position I don't think I've ever had a situation where that didn't just mess everything up. I think it just adjusts the EP so the other registers will not contain the values that corresponds to the new EP. 1 Share this post Link to post
Anders Melander 1783 Posted October 26, 2021 34 minutes ago, David Heffernan said: Great to see that MS has done the right thing here Why was their original decision "the wrong thing"? Wasn't it simply a business decision that a (maybe large) group of people was dissatisfied with? Share this post Link to post
Lars Fosdal 1792 Posted October 26, 2021 32 minutes ago, Uwe Raabe said: The current debugger lets you simply drag the execution pointer to a line before or after the current position: Most of my code involves a multitude of objects in various containers and their interactions. I've never dragged the exe pointer or set the execution point during debugging, as it would most likely create conflicting data. 1 Share this post Link to post
Lars Fosdal 1792 Posted October 26, 2021 1 minute ago, Anders Melander said: Why was their original decision "the wrong thing"? Wasn't it simply a business decision that a (maybe large) group of people was dissatisfied with? The "wrong thing" was to first introduce it to the open source libs, then pull it back - instead of keeping it private, and adding it to the open source lib later. 1 Share this post Link to post
Anders Melander 1783 Posted October 26, 2021 17 minutes ago, Stefan Glienke said: They cannot even build a stable debugger - how could they ever achieve this. I know you're just venting, but I can't see how they could achieve it even if the debugger was better... or why they should. Share this post Link to post
Anders Melander 1783 Posted October 26, 2021 3 minutes ago, Lars Fosdal said: The "wrong thing" was to first introduce it to the open source libs, then pull it back - instead of keeping it private, and adding it to the open source lib later. Makes sense. Thanks. Share this post Link to post
David Heffernan 2345 Posted October 26, 2021 23 minutes ago, Anders Melander said: Why was their original decision "the wrong thing"? Wasn't it simply a business decision that a (maybe large) group of people was dissatisfied with? I think this controversy was well covered at The Register, I'd read their articles if you are interested Share this post Link to post
Lars Fosdal 1792 Posted October 26, 2021 The Register is definitively one of the more interesting and accurate sites on all things IT these days. Very little fluff and rumors. Edit: Here is the "wrong thing" article: https://www.theregister.com/2021/10/22/microsoft_net_hot_reload_visual_studio/ Also, the BOFH posts usually are good for a laugh and a nod. Share this post Link to post
David Heffernan 2345 Posted October 26, 2021 1 minute ago, Lars Fosdal said: The Register is definitively one of the more interesting and accurate sites on all things IT these days. Also, Verity Stob! Share this post Link to post
Lars Fosdal 1792 Posted October 26, 2021 6 minutes ago, David Heffernan said: Also, Verity Stob! It has been too long since the last "Clan of Kahn" "Sons of Kahn" post 🙂 1 Share this post Link to post
David Heffernan 2345 Posted October 26, 2021 Just now, Lars Fosdal said: It has been too long since the last "Clan of Kahn" post 🙂 Perhaps this is just the final confirmation of the end of days for Delphi, if Verity Stob isn't producing new Sons of Kahn material, then does Delphi really exist? 1 Share this post Link to post
Fr0sT.Brutal 900 Posted October 26, 2021 1 hour ago, Anders Melander said: I don't think I've ever had a situation where that didn't just mess everything up. I think it just adjusts the EP so the other registers will not contain the values that corresponds to the new EP. I must say a word of defense here. Probably my cases were simpler but I successfully do this "step back" from time to time. Share this post Link to post
Mike Torrettinni 198 Posted October 26, 2021 16 hours ago, PeterPanettone said: Just pipe-dreaming: Wouldn't that be a wonderful feature for Delphi? At first I couldn't imagine why could this be useful. But then I thought about all the little visual changes I need to do to on some forms to fit the desired look, and being able to hot reload a simple change of position or alignment or text and no need for reloading the project, this wold be really cool to have. Not sure how could it be useful for anything more than simple changes, but even just for my use case, I would vote for the 11.1/11.2 patch to include this feature! 1 2 Share this post Link to post
Stefan Glienke 2002 Posted October 26, 2021 1 hour ago, Anders Melander said: I can't see [...] why they should. Because hot reload is a modern part of the R in RAD. Stopping, recompiling and getting to the point where you were before the change would be completely unnecessary. Game devs using UE or similar tools have been using this for quite a while. 1 Share this post Link to post
Martin Sedgewick 30 Posted October 26, 2021 I remember years ago watching a video of "Notch" using Java to create a game and he leaned heavily on hot reload. It was immediately obvious the benefits. The game was running. He modified some function or other and hit a key and the game updated with the change. The time saved over days, weeks and months would be incredible. Obviously it depends on the software. but if you have to compile, run, login, get to point X it all adds up. 2 Share this post Link to post
Anders Melander 1783 Posted October 26, 2021 21 minutes ago, Stefan Glienke said: Because hot reload is a modern part of the R in RAD. Stopping, recompiling and getting to the point where you were before the change would be completely unnecessary. Game devs using UE or similar tools have been using this for quite a while. I'm not questioning the usefulness of it. I would absolutely love that feature. I'm questioning why Embarcadero would want to invite the inevitable complaints when the feature, inevitably, failed to work 100% of the time - or even just not as good as VC/VC++. AFAIK, what UE does is just reloading dynamic DLLs if you recompile them. Not really comparable I think. Share this post Link to post
Uwe Raabe 2057 Posted October 26, 2021 55 minutes ago, Anders Melander said: what UE does is just reloading dynamic DLLs if you recompile them. That is basically what you already can achieve with Delphi when you work with dynamic package loading. The point with such an approach is that the code must be able to store and restore states between a reload. Share this post Link to post
dummzeuch 1505 Posted October 26, 2021 4 hours ago, Anders Melander said: I don't think I've ever had a situation where that didn't just mess everything up. I think it just adjusts the EP so the other registers will not contain the values that corresponds to the new EP. I use it often to repeat a call to a function where I missed something when stepping trough the first time. Works without a problem for this and saves the time to restart the processing. e.g.: SomeCodeHere; try SomeFunctionCall(SomeParameters); // <== Code raised an exception I need to investigate except on e: Exception do LogException(e); end; SomeMoreCodeHere; // <== so I place a breakpoint here // (after the debugger stopped on the exception) // and then set the execution point back to the function call Of course after that the call stack may be broken, but usually I stop the process anyway to fix the problem. Share this post Link to post
PeterPanettone 157 Posted October 26, 2021 A great way to change things at run-time in Delphi applications is a RUN-TIME OBJECT-INSPECTOR. Share this post Link to post