-
Notifications
You must be signed in to change notification settings - Fork 413
Open
Labels
Description
Summary
In VS Code (Java debugger attach mode), breakpoints set directly in JSP are frequently shown as Unverified breakpoint.
However, if I set a breakpoint in the generated servlet source (index_jsp.java) on an executable line, the debugger can stop and map back to the corresponding line in index.jsp.
This looks like a JSP/SMAP line mapping + breakpoint verification inconsistency.
Environment
- VS Code:
- Version: 1.109.5 (user setup)
- Commit: 072586267e68ece9a47aa43f8c108e0dcbf44622
- Date: 2026-02-19T19:43:32.382Z
- Electron: 39.3.0
- Chromium: 142.0.7444.265
- Node.js: 22.21.1
- OS: Windows_NT x64 10.0.26200
- WSL:
- Ubuntu 20.04 LTS (Focal Fossa)
- Extensions:
- Debugger for Java (
vscjava.vscode-java-debug) v0.58.5 - Extension Pack for Java (
vscjava.vscode-java-pack) v0.30.5 - Language Support for Java by Red Hat (
redhat.java) v1.52.0
- Debugger for Java (
- Java/Build tools:
- java (sdk env output):
11.0.28-tem java --versionoutput at runtime:OpenJDK 21.0.8 Temurin- ant:
1.10.14 - maven:
3.9.12
- java (sdk env output):
- Tomcat:
- Apache Tomcat 9.0.115
Debug configuration (launch.json)
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Tomcat9 (Manual Start)",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": 8000
},
{
"name": "Redeploy + Start + Attach (Tomcat9)",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": 8000,
"preLaunchTask": "ant: debug-redeploy-start"
}
]
}Reproduction project snippets
JSP source
WebContent/WEB-INF/contents/index.jsp
<%
...
String aaa = (String)(request.getAttribute("aaa"));
%>
...
<div>
<%=aaa%>
</div>Generated servlet source
<CATALINA_BASE>/work/Catalina/localhost/jg-web3/org/apache/jsp/WEB_002dINF/contents/index_jsp.java
...
String aaa = (String)(request.getAttribute("aaa"));
...
out.print(aaa);
...Steps to reproduce
- Start Tomcat with JPDA enabled (port 8000).
- Attach using VS Code Java debugger.
- Set breakpoint directly in
index.jspscriptlet line(s). - Access the page.
- Observe: breakpoint is often
Unverified breakpointand not hit. - Open generated
index_jsp.javaunder Tomcatworkdirectory. - Set breakpoint on an executable line in
index_jsp.java. - Access the same page again.
- Observe: debugger can stop, and VS Code maps to
index.jspline.
Actual behavior
- JSP breakpoints are frequently unverified.
- Breakpoints in
index_jsp.javaonly work on executable lines. - If the line is executable, stop can map to same line number in JSP.
- Breakpoints on blank/non-executable lines in
index_jsp.javado not stop.
Expected behavior
- Breakpoints set on executable JSP lines should be verified and consistently hit.
- JSP source breakpoint behavior should be consistent with generated servlet mapping.
Additional notes
- This behavior suggests a gap in JSP source mapping / breakpoint verification handling.
- It would be helpful if debugger diagnostics clarified why a JSP breakpoint is unverified.
Evidence
- VS Code UI shows
Unverified Breakpointon JSP lines (screenshot attached). - Generated servlet breakpoints can be hit only on executable lines.
in additional
This investigation and report were prepared in collaboration with GPT-5.3-Codex.
Reactions are currently unavailable