robotcode-debugger 0.106.1__tar.gz → 0.108.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-0.106.1 → robotcode_debugger-0.108.0}/PKG-INFO +3 -3
  2. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/pyproject.toml +2 -2
  3. robotcode_debugger-0.108.0/src/robotcode/debugger/__version__.py +1 -0
  4. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/debugger.py +48 -12
  5. robotcode_debugger-0.106.1/src/robotcode/debugger/__version__.py +0 -1
  6. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/.gitignore +0 -0
  7. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/LICENSE.txt +0 -0
  8. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/README.md +0 -0
  9. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/__init__.py +0 -0
  10. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/cli.py +0 -0
  11. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/dap_types.py +0 -0
  12. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/default_capabilities.py +0 -0
  13. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/hooks.py +0 -0
  14. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/id_manager.py +0 -0
  15. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/launcher/__init__.py +0 -0
  16. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/launcher/cli.py +0 -0
  17. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/launcher/client.py +0 -0
  18. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/launcher/run.py +0 -0
  19. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/launcher/server.py +0 -0
  20. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/listeners.py +0 -0
  21. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/protocol.py +0 -0
  22. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/py.typed +0 -0
  23. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.0}/src/robotcode/debugger/run.py +0 -0
  24. {robotcode_debugger-0.106.1 → robotcode_debugger-0.108.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: 0.106.1
3
+ Version: 0.108.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.106.1
29
- Requires-Dist: robotcode-runner==0.106.1
28
+ Requires-Dist: robotcode-jsonrpc2==0.108.0
29
+ Requires-Dist: robotcode-runner==0.108.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.106.1",
32
- "robotcode-runner==0.106.1",
31
+ "robotcode-jsonrpc2==0.108.0",
32
+ "robotcode-runner==0.108.0",
33
33
  ]
34
34
 
35
35
  [project.optional-dependencies]
@@ -0,0 +1 @@
1
+ __version__ = "0.108.0"
@@ -573,6 +573,9 @@ class Debugger:
573
573
  return []
574
574
 
575
575
  def process_start_state(self, source: str, line_no: int, type: str, status: str) -> None:
576
+ if self.state == State.CallKeyword:
577
+ return
578
+
576
579
  if self.state == State.Stopped:
577
580
  return
578
581
 
@@ -718,6 +721,8 @@ class Debugger:
718
721
  description: str,
719
722
  text: Optional[str],
720
723
  ) -> None:
724
+ if self.state == State.CallKeyword:
725
+ return
721
726
  if self.state == State.Stopped:
722
727
  return
723
728
 
@@ -911,6 +916,9 @@ class Debugger:
911
916
  self.stack_frames[0].stack_frames.popleft()
912
917
 
913
918
  def start_suite(self, name: str, attributes: Dict[str, Any]) -> None:
919
+ if self.state == State.CallKeyword:
920
+ return
921
+
914
922
  if not self.run_started:
915
923
  self.run_started = True
916
924
  self.debug_logger = DebugLogger()
@@ -956,6 +964,9 @@ class Debugger:
956
964
  self.wait_for_running()
957
965
 
958
966
  def end_suite(self, name: str, attributes: Dict[str, Any]) -> None:
967
+ if self.state == State.CallKeyword:
968
+ return
969
+
959
970
  if self.debug:
960
971
  status = attributes.get("status", "")
961
972
 
@@ -975,6 +986,9 @@ class Debugger:
975
986
  self.remove_stackframe_entry(name, type, source, line_no)
976
987
 
977
988
  def start_test(self, name: str, attributes: Dict[str, Any]) -> None:
989
+ if self.state == State.CallKeyword:
990
+ return
991
+
978
992
  source = attributes.get("source")
979
993
  line_no_dummy = attributes.get("lineno", 1)
980
994
  if isinstance(line_no_dummy, str):
@@ -999,6 +1013,9 @@ class Debugger:
999
1013
  self.wait_for_running()
1000
1014
 
1001
1015
  def end_test(self, name: str, attributes: Dict[str, Any]) -> None:
1016
+ if self.state == State.CallKeyword:
1017
+ return
1018
+
1002
1019
  if self.debug:
1003
1020
  status = attributes.get("status", "")
1004
1021
 
@@ -1030,6 +1047,9 @@ class Debugger:
1030
1047
  return EXECUTION_CONTEXTS.current.namespace.get_runner(name)._handler
1031
1048
 
1032
1049
  def start_keyword(self, name: str, attributes: Dict[str, Any]) -> None:
1050
+ if self.state == State.CallKeyword:
1051
+ return
1052
+
1033
1053
  status = attributes.get("status", "")
1034
1054
  source = attributes.get("source")
1035
1055
  line_no_dummy = attributes.get("lineno", 1)
@@ -1157,6 +1177,9 @@ class Debugger:
1157
1177
  return True
1158
1178
 
1159
1179
  def end_keyword(self, name: str, attributes: Dict[str, Any]) -> None:
1180
+ if self.state == State.CallKeyword:
1181
+ return
1182
+
1160
1183
  type = attributes.get("type")
1161
1184
  if self.debug:
1162
1185
  status = attributes.get("status", "")
@@ -1618,6 +1641,18 @@ class Debugger:
1618
1641
  def _run_keyword(self, kw: Keyword, context: Any) -> Any:
1619
1642
  return kw.run(context)
1620
1643
 
1644
+ if get_robot_version() >= (7, 2):
1645
+
1646
+ @staticmethod
1647
+ def check_message_is_logged(listener: Any, msg: Any) -> bool:
1648
+ return cast(bool, listener._is_logged(msg))
1649
+
1650
+ else:
1651
+
1652
+ @staticmethod
1653
+ def check_message_is_logged(listener: Any, msg: Any) -> bool:
1654
+ return cast(bool, listener._is_logged(msg.level))
1655
+
1621
1656
  def evaluate(
1622
1657
  self,
1623
1658
  expression: str,
@@ -1745,18 +1780,19 @@ class Debugger:
1745
1780
  result = e
1746
1781
  break
1747
1782
  finally:
1748
- messages = LOGGER._log_message_cache or []
1749
- for msg in messages or ():
1750
- # hack to get and evaluate log level
1751
- listener: Any = next(iter(LOGGER), None)
1752
- if listener is None or listener._is_logged(msg.level):
1753
- self.log_message(
1754
- {
1755
- "level": msg.level,
1756
- "message": msg.message,
1757
- "timestamp": msg.timestamp,
1758
- }
1759
- )
1783
+ if get_robot_version() <= (7, 2):
1784
+ messages = LOGGER._log_message_cache or []
1785
+ for msg in messages or ():
1786
+ # hack to get and evaluate log level
1787
+ listener: Any = next(iter(LOGGER), None)
1788
+ if listener is None or self.check_message_is_logged(listener, msg):
1789
+ self.log_message(
1790
+ {
1791
+ "level": msg.level,
1792
+ "message": msg.message,
1793
+ "timestamp": msg.timestamp,
1794
+ }
1795
+ )
1760
1796
  return result
1761
1797
 
1762
1798
  result = self.run_in_robot_thread(run_kw)
@@ -1 +0,0 @@
1
- __version__ = "0.106.1"