Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up"Cannot find any changed classes for hot replace!" #855
Comments
|
i can reproduce it. Thanks for the detailed steps. |
|
I'm facing same issue. HCR not working as expected and after each change I've to restart the program. |
|
The root cause for the original issue is the changed class is contained by multiple projects, and the debugger doesn't handle well during dedup. @ijazfx What's your scenario? Are you working on a multi module maven projects? |
|
Yes I've basically a complete framework which itself is a multi-module maven project. Then I've another project which is itself a multi-module maven project and this project uses some of the components from the framework project. |
|
I see, looks like the same root cause. js side is just glue code. The actual logic happens at debug server, see https://github.com/microsoft/java-debug/blob/master/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/JavaHotCodeReplaceProvider.java#L340 |
|
@ijazfx @maxstreifeneder Could you have a try on a private fix? https://raw.githubusercontent.com/testforstephen/vscode-test/master/vscode-java-debug-0.27.2.vsix This private fix is built against Java 11, you need update your JDK to 11 when you try it. |
|
Yes it is working as expected. I wasn't able to test all the scenarios but a quick test revealed fast manual HCR. |
|
@testforstephen kindly confirm one thing. Changed resources such as .css, .js are not detected and hence requires restart of the application. |
|
Correct, the debugger only supports Java code hot reloading. It doesn't have the knowledge of your application background. |
|
Okay, thanks for the fix though. |
|
@testforstephen works for me! thanks a lot for your quick response and fix - couldn't be any better :-) |
|
I am encountering this issue too but the fix doesn't work. After applying the fix I get the error openjdk version "11.0.7" 2020-04-14 Visual Studio Code version: 1.46.1 |
|
@Nintorac Could you share the log file? |
|
I tried updating to Visual Studio Code version: 1.47.3 and still get errors. Logs here https://pastebin.com/qLZGaAer |
|
java.version=9.0.4 Oh, you're still using an old vscode-java version and JDK 9. My private fix is built against Java 11. Could you try to update to JDK 11? And if you still need build your project against to JDK 1.8, then you can try "java.configuration.runtimes" setting as below.
|
|
Yup, that works. Thanks +1 |
[provide a description of the issue]
Environment
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
Steps To Reproduce
git clone https://github.com/maxstreifeneder/HotCode-Replace
mvn compile
set a Breakpoint in com.maxstreifeneder.hotreload.handlers.test.HelloController.java, Line 11.
Start Debugger: Run -> Start Debugging
Open a Browser and hit localhost:8080/hotreload
You will be prompted with a Password prompt. Take the user + password from the log output:

Debugger will stop.
Change Line 11 to System.out.println("hotreload");
Press the "Hot Code Replace" Button in the Debugger Tools.

"Cannot find any changed classes for hot replace!" will appear.
[attach a sample project reproducing the error]
https://github.com/maxstreifeneder/HotCode-Replace
Current Result
"Cannot find any changed classes for hot replace!" when trying to use the Hot Code Replacement
Expected Result
Changed code in VS Code will be pushed to the running application using the debugging capabilities
Additional Informations