vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Breakpoint line misalignment in `Virtual threads` of `JDK19`

Open mozhuanzuojing opened this issue 3 years ago • 2 comments
trafficstars

Performing tasks using JDK19's virtual thread in tomcat, when I debug in task code. Breakpoint validation is fine, but the code that is executed when the breakpoint is actually commanded is not the code on the source line where the breakpoint is located. Their error is about 4 lines off.

Environment
  • Operating System:window10
  • JDK version:19
  • Visual Studio Code version:1.72
  • Java extension version:v1.11.0
  • Java Debugger extension version:v0.45.0
Steps To Reproduce
  1. install JDK19 and set default JDK
  2. Write an Action in tomcat, then start a virtual thread to execute a new task, debugging the code in the task.
Current Result

Debug breakpoints execute lines of code and source code that are not mapped correctly. The difference is about 4 rows

Expected Result

The debug breakpoint executes the same code as the source line of code

Additional Informations

The debugging of all classes has the problem of inconsistent code and source code executed by breakpoints

mozhuanzuojing avatar Oct 18 '22 04:10 mozhuanzuojing

The debugger itself won't change the line number info during debugging, it just reflects what's returned from the target JVM. The possible reason is that the source code version is not the one running in your tomcat server. Could you please double check it by yourself?

testforstephen avatar Oct 20 '22 07:10 testforstephen

The debugger itself won't change the line number info during debugging, it just reflects what's returned from the target JVM. The possible reason is that the source code version is not the one running in your tomcat server. Could you please double check it by yourself?

Thanks, I'll double-check

mozhuanzuojing avatar Oct 20 '22 14:10 mozhuanzuojing