SetBreakpointsRequestHandler fails when supplied path is using forward slashes
@testforstephen 已經在處理了。
開始於 2020年2月7日。
評估
這個 Issue 還沒有評估資料。
描述
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)
- 主要語言
- Java
- 星號
- 409
- 分支
- 204
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 4
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/java-debug 的其他 Issue
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#611 · 2 則留言 ·
-
ai-triaged enhancement
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#608 · 3 則留言 ·
-
ai-triaged question
難度 5/5 一週以上 新手友好度 30/100
microsoft/java-debug#597 · 1 則留言 ·
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 25/100
microsoft/java-debug#588 · 1 則留言 ·
-
ai-triaged question
難度 2/5 1-3 小時 新手友好度 35/100
microsoft/java-debug#582 · 1 則留言 ·
查看 microsoft/java-debug 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 76/100