robotcode-debugger 1.0.2__tar.gz → 1.1.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-1.0.2 → robotcode_debugger-1.1.0}/PKG-INFO +3 -3
  2. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/pyproject.toml +2 -2
  3. robotcode_debugger-1.1.0/src/robotcode/debugger/__version__.py +1 -0
  4. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/debugger.py +6 -6
  5. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/launcher/server.py +5 -3
  6. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/protocol.py +2 -2
  7. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/run.py +4 -5
  8. robotcode_debugger-1.0.2/src/robotcode/debugger/__version__.py +0 -1
  9. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/.gitignore +0 -0
  10. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/LICENSE.txt +0 -0
  11. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/README.md +0 -0
  12. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/__init__.py +0 -0
  13. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/cli.py +0 -0
  14. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/dap_types.py +0 -0
  15. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/default_capabilities.py +0 -0
  16. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/hooks.py +0 -0
  17. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/id_manager.py +0 -0
  18. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/launcher/__init__.py +0 -0
  19. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/launcher/cli.py +0 -0
  20. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/launcher/client.py +0 -0
  21. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/launcher/run.py +0 -0
  22. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/listeners.py +0 -0
  23. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.0}/src/robotcode/debugger/py.typed +0 -0
  24. {robotcode_debugger-1.0.2 → robotcode_debugger-1.1.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: 1.0.2
3
+ Version: 1.1.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.8
28
- Requires-Dist: robotcode-jsonrpc2==1.0.2
29
- Requires-Dist: robotcode-runner==1.0.2
28
+ Requires-Dist: robotcode-jsonrpc2==1.1.0
29
+ Requires-Dist: robotcode-runner==1.1.0
30
30
  Requires-Dist: robotframework>=4.1.0
31
31
  Provides-Extra: debugpy
32
32
  Requires-Dist: debugpy; extra == 'debugpy'
@@ -28,8 +28,8 @@ classifiers = [
28
28
  dynamic = ["version"]
29
29
  dependencies = [
30
30
  "robotframework>=4.1.0",
31
- "robotcode-jsonrpc2==1.0.2",
32
- "robotcode-runner==1.0.2",
31
+ "robotcode-jsonrpc2==1.1.0",
32
+ "robotcode-runner==1.1.0",
33
33
  ]
34
34
 
35
35
  [project.optional-dependencies]
@@ -0,0 +1 @@
1
+ __version__ = "1.1.0"
@@ -547,7 +547,6 @@ class Debugger:
547
547
  lines: Optional[List[int]] = None,
548
548
  source_modified: Optional[bool] = None,
549
549
  ) -> List[Breakpoint]:
550
-
551
550
  if self.is_windows_path(source.path or ""):
552
551
  path: pathlib.PurePath = pathlib.PureWindowsPath(source.path or "")
553
552
  else:
@@ -647,7 +646,6 @@ class Debugger:
647
646
  if source_path in self.breakpoints:
648
647
  breakpoints = [v for v in self.breakpoints[source_path].breakpoints if v.line == line_no]
649
648
  if len(breakpoints) > 0:
650
-
651
649
  for point in breakpoints:
652
650
  if point.condition is not None:
653
651
  hit = False
@@ -1637,8 +1635,8 @@ class Debugger:
1637
1635
 
1638
1636
  return list(result.values())
1639
1637
 
1640
- IS_VARIABLE_RE: ClassVar = re.compile(r"^[$@&%]\{.*\}(\[[^\]]*\])?$")
1641
- IS_VARIABLE_ASSIGNMENT_RE: ClassVar = re.compile(r"^[$@&%]\{.*\}=?$")
1638
+ IS_VARIABLE_RE: ClassVar = re.compile(r"^[$@&]\{.*\}(\[[^\]]*\])?$")
1639
+ IS_VARIABLE_ASSIGNMENT_RE: ClassVar = re.compile(r"^[$@&]\{.*\}=?$")
1642
1640
  SPLIT_LINE: ClassVar = re.compile(r"(?= {2,}| ?\t)\s*")
1643
1641
  CURRDIR: ClassVar = re.compile(r"(?i)\$\{CURDIR\}")
1644
1642
 
@@ -1762,8 +1760,10 @@ class Debugger:
1762
1760
  else:
1763
1761
  result = internal_evaluate_expression(vars.replace_string(expression), vars)
1764
1762
  else:
1765
- if self.IS_VARIABLE_RE.match(expression.strip()):
1766
- result = vars[expression.strip()]
1763
+ parts = self.SPLIT_LINE.split(expression.strip())
1764
+ if parts and len(parts) == 1 and self.IS_VARIABLE_RE.match(parts[0].strip()):
1765
+ # result = vars[parts[0].strip()]
1766
+ result = vars.replace_scalar(parts[0].strip())
1767
1767
  else:
1768
1768
 
1769
1769
  def get_test_body_from_string(command: str) -> TestCase:
@@ -143,8 +143,8 @@ class LauncherDebugAdapterProtocol(DebugAdapterProtocol):
143
143
  robotcode_run_args = [
144
144
  python or sys.executable,
145
145
  *debugger_script,
146
- *itertools.chain.from_iterable(["--profile", p] for p in profiles or []),
147
- *itertools.chain.from_iterable(["--default-path", p] for p in paths or []),
146
+ *itertools.chain.from_iterable(["-p", p] for p in profiles or []),
147
+ *itertools.chain.from_iterable(["-dp", p] for p in paths or []),
148
148
  *(robotCodeArgs or []),
149
149
  "debug",
150
150
  ]
@@ -245,7 +245,9 @@ class LauncherDebugAdapterProtocol(DebugAdapterProtocol):
245
245
  kind=(
246
246
  RunInTerminalKind.INTEGRATED
247
247
  if console == "integratedTerminal"
248
- else RunInTerminalKind.EXTERNAL if console == "externalTerminal" else None
248
+ else RunInTerminalKind.EXTERNAL
249
+ if console == "externalTerminal"
250
+ else None
249
251
  ),
250
252
  title=name,
251
253
  )
@@ -44,7 +44,7 @@ class DebugAdapterErrorResponseError(JsonRPCException):
44
44
  def __init__(self, error: ErrorResponse) -> None:
45
45
  super().__init__(
46
46
  f'{error.message} (seq={error.request_seq} command="{error.command}")'
47
- f'{f": {error.body.error}" if error.body is not None and error.body.error else ""}'
47
+ f"{f': {error.body.error}' if error.body is not None and error.body.error else ''}"
48
48
  )
49
49
  self.error = error
50
50
 
@@ -60,7 +60,7 @@ class DebugAdapterRPCErrorException(JsonRPCException):
60
60
  ) -> None:
61
61
  super().__init__(
62
62
  f'{(message + " ") if message else ""}(seq={request_seq} command="{command}")'
63
- f'{f": {error_message}" if error_message else ""}'
63
+ f"{f': {error_message}' if error_message else ''}"
64
64
  )
65
65
  self.message = message
66
66
  self.request_seq = request_seq
@@ -114,11 +114,10 @@ def start_debugpy(
114
114
  if port != debugpy_port:
115
115
  _logger.warning(lambda: f"start debugpy session on port {port}")
116
116
 
117
- # this is set by vscode for non config debugpy sessions, we don't need it, so remove it
118
- if "DEBUGPY_ADAPTER_ENDPOINTS" in os.environ:
119
- del os.environ["DEBUGPY_ADAPTER_ENDPOINTS"]
120
- if "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS" in os.environ:
121
- del os.environ["VSCODE_DEBUGPY_ADAPTER_ENDPOINTS"]
117
+ # remove unwanted env variables
118
+ for env_var in ["DEBUGPY_ADAPTER_ENDPOINTS", "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS"]:
119
+ if env_var in os.environ:
120
+ del os.environ[env_var]
122
121
 
123
122
  if enable_debugpy(port, addresses):
124
123
  global config_done_callback
@@ -1 +0,0 @@
1
- __version__ = "1.0.2"