SetBreakpointsRequestHandler fails when supplied path is using forward slashes
@testforstephen đang làm issue này rồi.
Từ ngày 7/2/2020.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description
When a DAP (debug adapter protocol) client sends a setBreakpoints request with a path that contains forward slashes the breakpoint is not set.
The server also (wrongfully?) reports back that the command was executed successfully.
Observed behavior
The code runs without halting at the breakpoint.
Expected behavior
The program should halt at the breakpoint and send a breakpoint event to the DAP client.
Logging with forward slashes (Not working)
Sending:
{
"command": "setBreakpoints",
"arguments": {
"source": {
"name": "Hello.java",
"path": "c:/project/src/main/java/Hello.java"
},
"breakpoints": [
{
"line": 6
}
],
"sourceModified": false,
"lines": [
6
]
},
"type": "request",
"seq": 3
}
Received:
{
"type": "response",
"seq": 4,
"body": {
"breakpoints": [
{
"message": "",
"line": 6,
"verified": null,
"id": 1
}
]
},
"command": "setBreakpoints",
"request_seq": 3,
"success": true
}
Logging with backward slashes (Working)
Sending:
{
"command": "setBreakpoints",
"arguments": {
"source": {
"name": "Hello.java",
"path": "c:\project\src\main\java\Hello.java"
},
"breakpoints": [
{
"line": 6
}
],
"sourceModified": false,
"lines": [
6
]
},
"type": "request",
"seq": 3
}
Received:
{
"type": "response",
"seq": 4,
"body": {
"breakpoints": [
{
"message": "",
"line": 6,
"verified": true,
"id": 1
}
]
},
"command": "setBreakpoints",
"request_seq": 3,
"success": true
}
Suggestion
I think the "offending" code is here
This line behaves differently depending if forward or backward slashes have been used.
Maybe replace all forward slashes with backward slashes if we are on windows.
Could be implemented before/after the drive letter fix.
System
Windows 10
DAP Client: emacs with lsp-mode/dap-mode
DAP Server: jdtls (Eclipse language server)
- Ngôn ngữ chính
- Java
- Star
- 409
- Fork
- 204
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/java-debug
-
ai-triaged bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/java-debug#611 · 2 bình luận ·
-
ai-triaged enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/java-debug#608 · 3 bình luận ·
-
ai-triaged question
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
microsoft/java-debug#597 · 1 bình luận ·
-
ai-triaged bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoft/java-debug#588 · 1 bình luận ·
-
Is Hamcrest a dependency? Đang mởai-triaged question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
microsoft/java-debug#582 · 1 bình luận ·
Tất cả issue của microsoft/java-debug
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
objectionary/hone-maven-plugin#1061 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
spring-projects/spring-modulith#1895 ·