robotcode-debugger 0.83.3__tar.gz → 0.85.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 (22) hide show
  1. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/.gitignore +3 -0
  2. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/PKG-INFO +3 -3
  3. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/pyproject.toml +2 -2
  4. robotcode_debugger-0.85.0/src/robotcode/debugger/__version__.py +1 -0
  5. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/debugger.py +9 -4
  6. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/launcher/server.py +1 -1
  7. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/run.py +7 -2
  8. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/server.py +2 -2
  9. robotcode_debugger-0.83.3/src/robotcode/debugger/__version__.py +0 -1
  10. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/LICENSE.txt +0 -0
  11. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/README.md +0 -0
  12. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/__init__.py +0 -0
  13. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/cli.py +0 -0
  14. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/dap_types.py +0 -0
  15. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/hooks.py +0 -0
  16. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/launcher/__init__.py +0 -0
  17. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/launcher/cli.py +0 -0
  18. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/launcher/client.py +0 -0
  19. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/launcher/run.py +0 -0
  20. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/listeners.py +0 -0
  21. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/protocol.py +0 -0
  22. {robotcode_debugger-0.83.3 → robotcode_debugger-0.85.0}/src/robotcode/debugger/py.typed +0 -0
@@ -293,3 +293,6 @@ report.html
293
293
  .ruff_cache/
294
294
 
295
295
  bundled/libs
296
+
297
+ # robotframework
298
+ results/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robotcode-debugger
3
- Version: 0.83.3
3
+ Version: 0.85.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==0.83.3
29
- Requires-Dist: robotcode-runner==0.83.3
28
+ Requires-Dist: robotcode-jsonrpc2==0.85.0
29
+ Requires-Dist: robotcode-runner==0.85.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==0.83.3",
32
- "robotcode-runner==0.83.3",
31
+ "robotcode-jsonrpc2==0.85.0",
32
+ "robotcode-runner==0.85.0",
33
33
  ]
34
34
 
35
35
  [project.optional-dependencies]
@@ -0,0 +1 @@
1
+ __version__ = "0.85.0"
@@ -756,7 +756,7 @@ class Debugger:
756
756
  OutputEvent(
757
757
  body=OutputEventBody(
758
758
  output=f"\u001b[38;5;14m{(type + ' ') if type else ''}\u001b[0m{name}\n",
759
- category=OutputCategory.CONSOLE,
759
+ category="OutputCategory.CONSOLE",
760
760
  group=OutputGroup.START,
761
761
  source=Source(path=str(self.map_path_to_client(source))) if source else None,
762
762
  line=line_no if source is not None else None,
@@ -778,7 +778,8 @@ class Debugger:
778
778
  category=OutputCategory.CONSOLE,
779
779
  group=OutputGroup.END,
780
780
  source=Source(path=str(self.map_path_to_client(source))) if source else None,
781
- line=line_no,
781
+ line=line_no if source is not None else None,
782
+ column=0 if source is not None else None,
782
783
  )
783
784
  ),
784
785
  )
@@ -1442,20 +1443,24 @@ class Debugger:
1442
1443
  )
1443
1444
  elif entry.suite_id() == variables_reference:
1444
1445
  globals = context.variables._global.as_dict()
1446
+ vars = entry.get_first_or_self().variables()
1447
+ vars_dict = vars.as_dict() if vars is not None else {}
1445
1448
  result.update(
1446
1449
  {
1447
1450
  k: self._create_variable(k, v)
1448
1451
  for k, v in context.variables._suite.as_dict().items()
1449
- if k not in globals or globals[k] != v
1452
+ if (k not in globals or globals[k] != v) and (k in vars_dict)
1450
1453
  }
1451
1454
  )
1452
1455
  elif entry.test_id() == variables_reference:
1453
1456
  globals = context.variables._suite.as_dict()
1457
+ vars = entry.get_first_or_self().variables()
1458
+ vars_dict = vars.as_dict() if vars is not None else {}
1454
1459
  result.update(
1455
1460
  {
1456
1461
  k: self._create_variable(k, v)
1457
1462
  for k, v in context.variables._test.as_dict().items()
1458
- if k not in globals or globals[k] != v
1463
+ if (k not in globals or globals[k] != v) and (k in vars_dict)
1459
1464
  }
1460
1465
  )
1461
1466
  elif entry.local_id() == variables_reference:
@@ -298,7 +298,7 @@ class LauncherDebugAdapterProtocol(DebugAdapterProtocol):
298
298
  run_env.update(env)
299
299
 
300
300
  await asyncio.get_event_loop().subprocess_exec(
301
- lambda: OutputProtocol(self), *run_args, cwd=cwd, env=run_env
301
+ lambda: OutputProtocol(self), *robotcode_run_args, *run_args, cwd=cwd, env=run_env
302
302
  )
303
303
 
304
304
  else:
@@ -75,8 +75,12 @@ async def _debug_adapter_server_async(
75
75
  ) -> None:
76
76
  from .server import DebugAdapterServer
77
77
 
78
- current_thread = threading.current_thread
79
- setattr(current_thread, "pydev_do_not_trace", True)
78
+ hidden_tasks = os.environ.get("ROBOTCODE_DISABLE_HIDDEN_TASKS", "0")
79
+ hide = hidden_tasks == "0"
80
+
81
+ if hide:
82
+ current_thread = threading.current_thread
83
+ setattr(current_thread, "pydev_do_not_trace", True)
80
84
 
81
85
  async with DebugAdapterServer(
82
86
  mode=mode,
@@ -240,6 +244,7 @@ def run_debugger(
240
244
 
241
245
  app.verbose("Start robot")
242
246
  try:
247
+ app.verbose(f"Create robot context with args: {args}")
243
248
  robot_ctx = robot.make_context("robot", args, parent=ctx)
244
249
  robot.invoke(robot_ctx)
245
250
  except SystemExit as e:
@@ -1,5 +1,6 @@
1
1
  import asyncio
2
2
  import os
3
+ import signal
3
4
  import threading
4
5
  from typing import Any, Callable, Dict, List, Literal, Optional, Union
5
6
 
@@ -215,6 +216,7 @@ class DebugAdapterServerProtocol(DebugAdapterProtocol):
215
216
 
216
217
  @_logger.call
217
218
  def exit(self, exit_code: int) -> None:
219
+
218
220
  with self._exited_lock:
219
221
  self.send_event(ExitedEvent(body=ExitedEventBody(exit_code=exit_code)))
220
222
  self._exited = True
@@ -232,8 +234,6 @@ class DebugAdapterServerProtocol(DebugAdapterProtocol):
232
234
  *args: Any,
233
235
  **kwargs: Any,
234
236
  ) -> None:
235
- import signal
236
-
237
237
  if not self._sigint_signaled:
238
238
  self._logger.info("Send SIGINT to process")
239
239
  signal.raise_signal(signal.SIGINT)
@@ -1 +0,0 @@
1
- __version__ = "0.83.3"