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.

hot code replace set to auto causes endless "appyling code changes" notifications

See original GitHub issue

Usually I use the “hode code replace” feature set to auto, so whenever I save the code is automatically injected into the running process. Since a few days this is not working as expected any more. As soon as I save, the functionality kicks in and the java LSP process goes crazy. It goes up to 200-300% CPU and never comes back. The problem seems to be that the “Applying code changes …” functionality is repeatedly started over and over again, but seems to never stop. It does not recover on its own, I have to restart vscode.

Environment
  • Operating System: macOS 11.6.2 (20G314)
  • JDK version:openjdk 17.0.1 2021-10-19
  • Visual Studio Code version: 1.65.1
  • Java extension version: v0.22.0
Steps To Reproduce
  1. Set “Hot code replace” to auto
  2. Halt on breakpoint
  3. Change code and save a few times in a row

After a few times it looks like this: The log contains proprietary code, so I cannot easily share it here. But it seems fine, no repeating (error) messages of any kind. Just the change detection seems to kick in repeatedly and invoke the “hot code replace” every time (which never returns).

Current Result

“Applying code changes” goes crazy. Bildschirmfoto 2022-03-09 um 09 53 40

Expected Result

Apply codes changes. Java LSP process should permanently consume 200-300% CPU after it.

Additional Informations

If I use the manual “hot code replace” (the lightning symbol), I can’t reproduce the issue.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
zabeth1commented, Mar 9, 2022

Same issue here, I had to go back using 1.3.0.

1reaction
mozhuanzuojingcommented, Apr 11, 2022

@rgrunber @testforstephen All of us in the development department have had this problem for over a month.

  • The steps to reproduce this problem are, after starting debugging, open any java file and save it more than three times in quick succession (Ctrl + S), which will cause all the code of the current project to be recompiled!
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Set Up Hot Code Replacement with Tomcat and Eclipse
This blog post will guide you through setting up Tomcat hot code replacement (also called hotswap debugging) in Eclipse. What Is “Hot Code...
Read more >
Hot Code Replace Failed (eclipse) - Stack Overflow
This means you changed a class while it was debugging an application and it could not update the class for the application while...
Read more >
4 free ways to hot-swap code on the JVM - Renato Athaydes
Re-build the environment with gradle clean createOsgi , then from one shell, start the environment and, when the application prints its message ...
Read more >
Hot Code Replacement for Java comes to Visual Studio Code
Hot code replacement (HCR), which doesn't require a restart, is a fast debugging technique in which the Java debugger transmits new class ...
Read more >
Docs • Svelte
The Svelte team maintains a VS Code extension and there are integrations with ... a <script> block are not automatically run again when...
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