robotcode-debugger 2.6.2__tar.gz → 2.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/PKG-INFO +3 -3
  2. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/pyproject.toml +2 -2
  3. robotcode_debugger-2.7.0/src/robotcode/debugger/__version__.py +1 -0
  4. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/cli.py +2 -0
  5. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/launcher/server.py +31 -8
  6. robotcode_debugger-2.6.2/src/robotcode/debugger/__version__.py +0 -1
  7. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/.gitignore +0 -0
  8. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/README.md +0 -0
  9. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/__init__.py +0 -0
  10. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/dap_types.py +0 -0
  11. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/debugger.py +0 -0
  12. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/default_capabilities.py +0 -0
  13. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/hooks.py +0 -0
  14. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/id_manager.py +0 -0
  15. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/launcher/__init__.py +0 -0
  16. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/launcher/cli.py +0 -0
  17. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/launcher/client.py +0 -0
  18. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/launcher/run.py +0 -0
  19. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/listeners.py +0 -0
  20. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/mixins.py +0 -0
  21. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/protocol.py +0 -0
  22. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/py.typed +0 -0
  23. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/run.py +0 -0
  24. {robotcode_debugger-2.6.2 → robotcode_debugger-2.7.0}/src/robotcode/debugger/server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotcode-debugger
3
- Version: 2.6.2
3
+ Version: 2.7.0
4
4
  Summary: RobotCode Debugger for Robot Framework
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -25,8 +25,8 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
25
25
  Classifier: Topic :: Utilities
26
26
  Classifier: Typing :: Typed
27
27
  Requires-Python: >=3.10
28
- Requires-Dist: robotcode-jsonrpc2==2.6.2
29
- Requires-Dist: robotcode-runner==2.6.2
28
+ Requires-Dist: robotcode-jsonrpc2==2.7.0
29
+ Requires-Dist: robotcode-runner==2.7.0
30
30
  Requires-Dist: robotframework>=5.0.0
31
31
  Provides-Extra: debugpy
32
32
  Requires-Dist: debugpy; extra == 'debugpy'
@@ -29,8 +29,8 @@ classifiers = [
29
29
  dynamic = ["version"]
30
30
  dependencies = [
31
31
  "robotframework>=5.0.0",
32
- "robotcode-jsonrpc2==2.6.2",
33
- "robotcode-runner==2.6.2",
32
+ "robotcode-jsonrpc2==2.7.0",
33
+ "robotcode-runner==2.7.0",
34
34
  ]
35
35
 
36
36
  [project.optional-dependencies]
@@ -0,0 +1 @@
1
+ __version__ = "2.7.0"
@@ -9,6 +9,7 @@ from robotcode.plugin.click_helper.options import (
9
9
  server_options,
10
10
  )
11
11
  from robotcode.plugin.click_helper.types import AddressesPort, add_options
12
+ from robotcode.plugin.click_helper.wrappable import wrappable
12
13
 
13
14
  from .__version__ import __version__
14
15
 
@@ -16,6 +17,7 @@ DEBUGGER_DEFAULT_PORT = 6612
16
17
  DEBUGPY_DEFAULT_PORT = 5678
17
18
 
18
19
 
20
+ @wrappable
19
21
  @click.command(
20
22
  context_settings={"allow_extra_args": True, "ignore_unknown_options": True},
21
23
  add_help_option=True,
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import asyncio
4
4
  import itertools
5
5
  import os
6
+ import shlex
6
7
  import sys
7
8
  from pathlib import Path
8
9
  from typing import Any, Dict, List, Literal, Optional
@@ -43,6 +44,32 @@ from ..protocol import DebugAdapterProtocol
43
44
  from .client import DAPClient, DAPClientError
44
45
 
45
46
 
47
+ def _build_robotcode_run_args(
48
+ python: str,
49
+ debugger_script: List[str],
50
+ profiles: Optional[List[str]],
51
+ paths: Optional[List[str]],
52
+ wrapper: Optional[List[str]],
53
+ robot_code_args: Optional[List[str]],
54
+ ) -> List[str]:
55
+ """Build the ``robotcode … debug`` command line.
56
+
57
+ A ``wrapper`` from the launch request (VS Code ``robotcode.debug.launchWrapper``)
58
+ is forwarded to robotcode as ``--wrapper``; robotcode applies it itself (and
59
+ ``--wrapper`` overrides the profile's ``wrapper``). Without one nothing is added
60
+ and robotcode resolves its profile ``wrapper`` alone.
61
+ """
62
+ return [
63
+ python,
64
+ *debugger_script,
65
+ *itertools.chain.from_iterable(["-p", p] for p in profiles or []),
66
+ *itertools.chain.from_iterable(["-dp", p] for p in paths or []),
67
+ *(["--wrapper", shlex.join(wrapper)] if wrapper else []),
68
+ *(robot_code_args or []),
69
+ "debug",
70
+ ]
71
+
72
+
46
73
  class OutputProtocol(asyncio.SubprocessProtocol):
47
74
  def __init__(self, parent: LauncherDebugAdapterProtocol) -> None:
48
75
  super().__init__()
@@ -133,6 +160,7 @@ class LauncherDebugAdapterProtocol(DebugAdapterProtocol):
133
160
  include: Optional[List[str]] = None,
134
161
  exclude: Optional[List[str]] = None,
135
162
  robotCodeArgs: Optional[List[str]] = None, # noqa: N803
163
+ wrapper: Optional[List[str]] = None,
136
164
  arguments: Optional[LaunchRequestArguments] = None,
137
165
  *_args: Any,
138
166
  **_kwargs: Any,
@@ -145,14 +173,9 @@ class LauncherDebugAdapterProtocol(DebugAdapterProtocol):
145
173
 
146
174
  debugger_script = ["-m", "robotcode.cli"] if self.debugger_script is None else [str(Path(self.debugger_script))]
147
175
 
148
- robotcode_run_args = [
149
- python or sys.executable,
150
- *debugger_script,
151
- *itertools.chain.from_iterable(["-p", p] for p in profiles or []),
152
- *itertools.chain.from_iterable(["-dp", p] for p in paths or []),
153
- *(robotCodeArgs or []),
154
- "debug",
155
- ]
176
+ robotcode_run_args = _build_robotcode_run_args(
177
+ python or sys.executable, debugger_script, profiles, paths, wrapper, robotCodeArgs
178
+ )
156
179
 
157
180
  if no_debug:
158
181
  robotcode_run_args += ["--no-debug"]
@@ -1 +0,0 @@
1
- __version__ = "2.6.2"