Skip to content

Commit 6bda8c0

Browse files
committed
Add DAP Run-In-Terminal Capability Flags and Update Build Configurations
Extend `InitializeRequestArguments` with two new boolean fields: `supportsRunInTerminalRequest` and `supportsArgsCanBeInterpretedByShell`, serializing them in both `To()` and `From()` methods. This enables the DAP client to advertise terminal launch support to debug servers. Also update the `dbgcli` project file to use `.exe` output extension and switch to the UNIX makefile generator for better cross-platform builds. Mark an unused local helper in `UI.cpp` with `[[maybe_unused]]` to silence compiler warnings. * dap/dap.hpp * dap/dap.cpp * dbgcli/dbgcli.project * dbgcli/UI.cpp **Generated by CodeLite** Signed-off-by: Eran Ifrah <eran@codelite.org>
1 parent e508ae9 commit 6bda8c0

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

dap/dap.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ Json InitializeRequestArguments::To() const
537537
json.Add("columnsStartAt1", columnsStartAt1);
538538
json.Add("pathFormat", pathFormat);
539539
json.Add("supportsInvalidatedEvent", supportsInvalidatedEvent);
540+
json.Add("supportsRunInTerminalRequest", supportsRunInTerminalRequest);
541+
json.Add("supportsArgsCanBeInterpretedByShell", supportsArgsCanBeInterpretedByShell);
540542
return json;
541543
}
542544

@@ -550,6 +552,8 @@ void InitializeRequestArguments::From(const Json& json)
550552
columnsStartAt1 = json["columnsStartAt1"].GetBool();
551553
pathFormat = json["pathFormat"].GetString();
552554
supportsInvalidatedEvent = json["supportsInvalidatedEvent"].GetBool();
555+
supportsRunInTerminalRequest = json["supportsRunInTerminalRequest"].GetBool();
556+
supportsArgsCanBeInterpretedByShell = json["supportsArgsCanBeInterpretedByShell"].GetBool();
553557
}
554558

555559
// ----------------------------------------

dap/dap.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,16 @@ struct WXDLLIMPEXP_DAP InitializeRequestArguments : public Any {
548548
* which is the native format. Values: 'path', 'uri', etc.
549549
*/
550550
wxString pathFormat = "path";
551+
552+
/**
553+
* Client supports the `runInTerminal` request.
554+
*/
555+
bool supportsRunInTerminalRequest = false;
556+
/**
557+
* Client supports the `argsCanBeInterpretedByShell` attribute on the
558+
* `runInTerminal` request.
559+
*/
560+
bool supportsArgsCanBeInterpretedByShell = false;
551561
ANY_CLASS(InitializeRequestArguments);
552562
JSON_SERIALIZE();
553563
};

dbgcli/UI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern void wxC10A1InitBitmapResources();
1212
namespace
1313
{
1414
// return the wxBORDER_SIMPLE that matches the current application theme
15-
wxBorder get_border_simple_theme_aware_bit()
15+
[[maybe_unused]] wxBorder get_border_simple_theme_aware_bit()
1616
{
1717
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__)
1818
return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_DEFAULT;

dbgcli/dbgcli.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<Library Value="ws2_32"/>
5050
</Linker>
5151
<ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
52-
<General OutputFile="$(ProjectName)" IntermediateDirectory="" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile).exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="no" IsGUIProgram="yes" IsEnabled="yes"/>
53-
<BuildSystem Name="CodeLite Makefile Generator"/>
52+
<General OutputFile="$(ProjectName).exe" IntermediateDirectory="" Command="$(WorkspacePath)/build-$(WorkspaceConfiguration)/bin/$(OutputFile)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib" PauseExecWhenProcTerminates="no" IsGUIProgram="yes" IsEnabled="yes"/>
53+
<BuildSystem Name="CodeLite Makefile Generator - UNIX"/>
5454
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
5555
<![CDATA[]]>
5656
</Environment>

0 commit comments

Comments
 (0)