microsoft / microsoft/vscode-java-debug
Unable to debug Java Card Applet Code using Java Card Simulator.
未关闭
还没有人认领这个 Issue。
ai-triaged
breakpoint
question
- 主要语言
- TypeScript
- 星标
- 591
- 派生
- 429
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 19
描述
I am trying to debug a Java Card Project in VS Code, but the breakpoints are not hit.
Environment
- Operating System: Windows 10.
- JDK version: 17.0.5 LTS
- Visual Studio Code version: 1.74.2
- Java extension version:
- Java Debugger extension version: 0.47.2022112823
Steps To Reproduce

- Download and Install Java Card Simulator from Oracle. [Java Card Classic Development Kit 3.0.5u4]
• https://www.oracle.com/java/technologies/java-archive-downloads-javame-downloads.html#javacardkitv305 - Download and Extract Sample Java Card Project. [Sample.zip attached.]
- Terminal 1: Start the Simulator.
•cd "{Your_Install_Location}\Java Card Development Kit 3.0.5u4\bin}"
•cref_tdual.exe -p 9025 -debugPort 7019 - Terminal 2: Launch APDU Tool.
•cd "{Your_Install_Location}\Java Card Development Kit 3.0.5u4\bin}"
•apdutool.bat -p 9025 - Load the cap file in Simulator.
• Copy paste the contents of {Your_Extract_Location}/apdu_scripts/cap-com.sample.script in Terminal-2 and press Enter - Installing the application in Simulator.
• Copy paste the contents of {Your_Extract_Location}/apdu_scripts/create-com.sample.MyApplet.script in Terminal-2 and press Enter. - Terminal 3: Launch Debug Proxy.
•cd "{Your_Install_Location}\Java Card Development Kit 3.0.5u4\lib"
•java -jar jc-debug-proxy.jar -port 8989 -vmPort 7019 -capPath {Your_Extract_Location}\Sample\deliverables\com\sample\javacard\sample.cap
---- Debugging In VS Code [Doesn't work]-----
- Open the Sample project in VS Code.
- Start the debug session in VS Code.(Press F5). [A launch.json with correct configurations is already present.]
- Open the file src/com/sample/MyApplet.java and set a breakpoint at line 57.
- In Terminal-2
•0x00 0xA4 0x04 0x00 0x06 0x89 0x89 0x89 0x89 0x89 0x81 0x7F;
• Press Enter.
• The breakpoint at Line-57 should be hit. [This doesn't work.]
---- Debugging with Eclipse for Java [Working] ----------
- Open the Sample project in Eclipse.
- Select File -> Open Projects From File System -> Select the Sample Directory.
- Setup Debug Configuration.
• Select Run -> Debug Configurations...
• On Left Panel Select Remote Java Application.
• In Project Field, Click on Browse and Select Sample.
• Change the port to 8989
• Click on Apply then Debug. - Open the file src/com/sample/MyApplet.java and set a breakpoint at line 57.
- In Terminal-2
•0x00 0xA4 0x04 0x00 0x06 0x89 0x89 0x89 0x89 0x89 0x81 0x7F;
• Press Enter.
• The breakpoint at Line-57 should be hit. [Working]
Additional Informations
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 Java Card Simulator、Debug Proxy、APDU Tool 和提供的 Sample 项目重现断点失效问题;将 VS Code F5 会话与在端口 8989 上正常工作的 Eclipse 远程调试会话进行比较。检查现有的 launch.json 以及位于 src/com/sample/MyApplet.java:57 的断点。完成的标准是 APDU 命令在 VS Code 中能够稳定地在该断点处停止。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100