-
-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move generic debug adapter settings to dedicated subsystem (Cherry-pi…
…ck of #15928) (#15977) Users likely don't care about different settings per-language, and if they want to run multiple they can use the CLI. Also, now we can log the server address. [ci skip-rust] [ci skip-build-wheels]
- Loading branch information
1 parent
d21b332
commit 2555dc7
Showing
5 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
from __future__ import annotations | ||
|
||
from pants.option.option_types import IntOption, StrOption | ||
from pants.option.subsystem import Subsystem | ||
from pants.util.strutil import softwrap | ||
|
||
|
||
class DebugAdapterSubsystem(Subsystem): | ||
options_scope = "debug-adapter" | ||
help = softwrap( | ||
""" | ||
Options used to configure and launch a Debug Adapter server. | ||
See https://microsoft.github.io/debug-adapter-protocol/ for more information. | ||
""" | ||
) | ||
|
||
host = StrOption( | ||
"--host", default="127.0.0.1", help="The hostname to use when launching the server." | ||
) | ||
port = IntOption( | ||
"--port", | ||
default=5678, | ||
help="The port to use when launching the server.", | ||
) |