dap: detect breakpoints for files when the case differs
Case insensitive filesystems can cause breakpoints to not be seen or verified. This is particularly true on Windows where the drive letter can also participate in the filepath. Change the detection logic for a breakpoint to be case insensitive. At the same time, report the name of the source as part of the breakpoint so that the editor can be told which casing we're expecting to be used. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
+14
-6
@@ -228,18 +228,26 @@ func testDapBuildVerifiedBreakpoints(t *testing.T, sb integration.Sandbox) {
|
||||
{
|
||||
Reason: "changed",
|
||||
Breakpoint: dap.Breakpoint{
|
||||
Id: 1,
|
||||
Line: 2,
|
||||
EndLine: 2,
|
||||
Id: 1,
|
||||
Line: 2,
|
||||
EndLine: 2,
|
||||
Source: &dap.Source{
|
||||
Name: "Dockerfile",
|
||||
Path: path.Join(dir, "Dockerfile"),
|
||||
},
|
||||
Verified: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
Reason: "changed",
|
||||
Breakpoint: dap.Breakpoint{
|
||||
Id: 2,
|
||||
Line: 10,
|
||||
EndLine: 10,
|
||||
Id: 2,
|
||||
Line: 10,
|
||||
EndLine: 10,
|
||||
Source: &dap.Source{
|
||||
Name: "Dockerfile",
|
||||
Path: path.Join(dir, "Dockerfile"),
|
||||
},
|
||||
Verified: false,
|
||||
Reason: "failed",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user