Skip to content

Commit 1f5ec67

Browse files
authored
Merge pull request #375 from PowerShell/rkeithhill/column-breakpoint-support
Enable column breakpoints.
2 parents 5453bab + 2fa3436 commit 1f5ec67

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/PowerShellEditorServices.Protocol/Client/DebugAdapterClientBase.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ protected override Task OnConnect()
4040
InitializeRequest.Type,
4141
new InitializeRequestArguments
4242
{
43-
LinesStartAt1 = true
43+
LinesStartAt1 = true,
44+
ColumnsStartAt1 = true
4445
});
4546
}
4647
}

src/PowerShellEditorServices.Protocol/DebugAdapter/InitializeRequest.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public class InitializeRequestArguments
2020

2121
public bool LinesStartAt1 { get; set; }
2222

23+
public bool ColumnsStartAt1 { get; set; }
24+
2325
public string PathFormat { get; set; }
2426

2527
public bool SourceMaps { get; set; }
@@ -30,31 +32,31 @@ public class InitializeRequestArguments
3032
public class InitializeResponseBody
3133
{
3234
/// <summary>
33-
/// Gets or sets a boolean value that determines whether the debug adapter
35+
/// Gets or sets a boolean value that determines whether the debug adapter
3436
/// supports the configurationDoneRequest.
3537
/// </summary>
3638
public bool SupportsConfigurationDoneRequest { get; set; }
3739

3840
/// <summary>
39-
/// Gets or sets a boolean value that determines whether the debug adapter
41+
/// Gets or sets a boolean value that determines whether the debug adapter
4042
/// supports functionBreakpoints.
4143
/// </summary>
4244
public bool SupportsFunctionBreakpoints { get; set; }
4345

4446
/// <summary>
45-
/// Gets or sets a boolean value that determines whether the debug adapter
47+
/// Gets or sets a boolean value that determines whether the debug adapter
4648
/// supports conditionalBreakpoints.
4749
/// </summary>
4850
public bool SupportsConditionalBreakpoints { get; set; }
4951

5052
/// <summary>
51-
/// Gets or sets a boolean value that determines whether the debug adapter
53+
/// Gets or sets a boolean value that determines whether the debug adapter
5254
/// supports breakpoints that break execution after a specified number of hits.
5355
/// </summary>
5456
public bool SupportsHitConditionalBreakpoints { get; set; }
5557

5658
/// <summary>
57-
/// Gets or sets a boolean value that determines whether the debug adapter
59+
/// Gets or sets a boolean value that determines whether the debug adapter
5860
/// supports a (side effect free) evaluate request for data hovers.
5961
/// </summary>
6062
public bool SupportsEvaluateForHovers { get; set; }

src/PowerShellEditorServices/Debugging/BreakpointDetails.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ private BreakpointDetails()
4545
/// <param name="hitCondition"></param>
4646
/// <returns></returns>
4747
public static BreakpointDetails Create(
48-
string source,
49-
int line,
50-
int? column = null,
48+
string source,
49+
int line,
50+
int? column = null,
5151
string condition = null,
5252
string hitCondition = null)
5353
{
@@ -86,6 +86,7 @@ public static BreakpointDetails Create(Breakpoint breakpoint)
8686
Verified = true,
8787
Source = lineBreakpoint.Script,
8888
LineNumber = lineBreakpoint.Line,
89+
ColumnNumber = lineBreakpoint.Column,
8990
Condition = lineBreakpoint.Action?.ToString()
9091
};
9192

0 commit comments

Comments
 (0)