robotcode-debugger 0.108.1__tar.gz → 0.109.1__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.
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/PKG-INFO +3 -3
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/pyproject.toml +2 -2
- robotcode_debugger-0.109.1/src/robotcode/debugger/__version__.py +1 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/debugger.py +47 -36
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/run.py +10 -9
- robotcode_debugger-0.108.1/src/robotcode/debugger/__version__.py +0 -1
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/.gitignore +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/LICENSE.txt +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/README.md +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/__init__.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/cli.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/dap_types.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/default_capabilities.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/hooks.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/id_manager.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/__init__.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/cli.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/client.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/run.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/server.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/listeners.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/protocol.py +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/py.typed +0 -0
- {robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/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.
|
|
3
|
+
Version: 0.109.1
|
|
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.
|
|
29
|
-
Requires-Dist: robotcode-runner==0.
|
|
28
|
+
Requires-Dist: robotcode-jsonrpc2==0.109.1
|
|
29
|
+
Requires-Dist: robotcode-runner==0.109.1
|
|
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.
|
|
32
|
-
"robotcode-runner==0.
|
|
31
|
+
"robotcode-jsonrpc2==0.109.1",
|
|
32
|
+
"robotcode-runner==0.109.1",
|
|
33
33
|
]
|
|
34
34
|
|
|
35
35
|
[project.optional-dependencies]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.109.1"
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/debugger.py
RENAMED
|
@@ -162,8 +162,11 @@ class StackTraceResult(NamedTuple):
|
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
class InvalidThreadIdError(Exception):
|
|
165
|
-
def __init__(self,
|
|
166
|
-
super().__init__(
|
|
165
|
+
def __init__(self, current_thread_id: Any, expected_thread_id: Any = None) -> None:
|
|
166
|
+
super().__init__(
|
|
167
|
+
f"Invalid thread id {current_thread_id}"
|
|
168
|
+
+ (f", expected {expected_thread_id}" if expected_thread_id is not None else "")
|
|
169
|
+
)
|
|
167
170
|
|
|
168
171
|
|
|
169
172
|
class MarkerObject:
|
|
@@ -429,12 +432,12 @@ class Debugger:
|
|
|
429
432
|
with self.condition:
|
|
430
433
|
self.state = State.Stopped
|
|
431
434
|
|
|
432
|
-
if self.
|
|
435
|
+
if self.main_thread_is_alive:
|
|
433
436
|
self.send_event(
|
|
434
437
|
self,
|
|
435
438
|
ContinuedEvent(
|
|
436
439
|
body=ContinuedEventBody(
|
|
437
|
-
thread_id=self.
|
|
440
|
+
thread_id=self.main_thread_id,
|
|
438
441
|
all_threads_continued=True,
|
|
439
442
|
)
|
|
440
443
|
),
|
|
@@ -442,22 +445,24 @@ class Debugger:
|
|
|
442
445
|
|
|
443
446
|
self.condition.notify_all()
|
|
444
447
|
|
|
448
|
+
def check_thread_id(self, thread_id: int) -> None:
|
|
449
|
+
if not self.main_thread_is_alive and thread_id != self.main_thread_id:
|
|
450
|
+
raise InvalidThreadIdError(thread_id, self.main_thread_id)
|
|
451
|
+
|
|
445
452
|
def continue_all(self) -> None:
|
|
446
|
-
if self.
|
|
447
|
-
self.continue_thread(self.
|
|
453
|
+
if self.main_thread_is_alive:
|
|
454
|
+
self.continue_thread(self.main_thread_id)
|
|
448
455
|
|
|
449
456
|
def continue_thread(self, thread_id: int) -> None:
|
|
450
|
-
|
|
451
|
-
raise InvalidThreadIdError(thread_id)
|
|
457
|
+
self.check_thread_id(thread_id)
|
|
452
458
|
|
|
453
459
|
with self.condition:
|
|
454
460
|
self.requested_state = RequestedState.Running
|
|
455
461
|
self.condition.notify_all()
|
|
456
462
|
|
|
457
463
|
def pause_thread(self, thread_id: int) -> None:
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
raise InvalidThreadIdError(thread_id)
|
|
464
|
+
if thread_id != 0:
|
|
465
|
+
self.check_thread_id(thread_id)
|
|
461
466
|
|
|
462
467
|
with self.condition:
|
|
463
468
|
self.requested_state = RequestedState.Pause
|
|
@@ -465,8 +470,7 @@ class Debugger:
|
|
|
465
470
|
self.condition.notify_all()
|
|
466
471
|
|
|
467
472
|
def next(self, thread_id: int, granularity: Optional[SteppingGranularity] = None) -> None:
|
|
468
|
-
|
|
469
|
-
raise InvalidThreadIdError(thread_id)
|
|
473
|
+
self.check_thread_id(thread_id)
|
|
470
474
|
|
|
471
475
|
with self.condition:
|
|
472
476
|
if self.full_stack_frames and self.full_stack_frames[0].type in [
|
|
@@ -500,8 +504,7 @@ class Debugger:
|
|
|
500
504
|
target_id: Optional[int] = None,
|
|
501
505
|
granularity: Optional[SteppingGranularity] = None,
|
|
502
506
|
) -> None:
|
|
503
|
-
|
|
504
|
-
raise InvalidThreadIdError(thread_id)
|
|
507
|
+
self.check_thread_id(thread_id)
|
|
505
508
|
|
|
506
509
|
with self.condition:
|
|
507
510
|
self.requested_state = RequestedState.StepIn
|
|
@@ -509,8 +512,7 @@ class Debugger:
|
|
|
509
512
|
self.condition.notify_all()
|
|
510
513
|
|
|
511
514
|
def step_out(self, thread_id: int, granularity: Optional[SteppingGranularity] = None) -> None:
|
|
512
|
-
|
|
513
|
-
raise InvalidThreadIdError(thread_id)
|
|
515
|
+
self.check_thread_id(thread_id)
|
|
514
516
|
|
|
515
517
|
with self.condition:
|
|
516
518
|
self.requested_state = RequestedState.StepOut
|
|
@@ -589,7 +591,7 @@ class Debugger:
|
|
|
589
591
|
body=StoppedEventBody(
|
|
590
592
|
description="Paused",
|
|
591
593
|
reason=StoppedReason.PAUSE,
|
|
592
|
-
thread_id=
|
|
594
|
+
thread_id=self.main_thread_id,
|
|
593
595
|
)
|
|
594
596
|
),
|
|
595
597
|
)
|
|
@@ -605,7 +607,7 @@ class Debugger:
|
|
|
605
607
|
body=StoppedEventBody(
|
|
606
608
|
description="Next step",
|
|
607
609
|
reason=StoppedReason.STEP,
|
|
608
|
-
thread_id=
|
|
610
|
+
thread_id=self.main_thread_id,
|
|
609
611
|
)
|
|
610
612
|
),
|
|
611
613
|
)
|
|
@@ -620,7 +622,7 @@ class Debugger:
|
|
|
620
622
|
body=StoppedEventBody(
|
|
621
623
|
description="Step in",
|
|
622
624
|
reason=StoppedReason.STEP,
|
|
623
|
-
thread_id=
|
|
625
|
+
thread_id=self.main_thread_id,
|
|
624
626
|
)
|
|
625
627
|
),
|
|
626
628
|
)
|
|
@@ -635,7 +637,7 @@ class Debugger:
|
|
|
635
637
|
body=StoppedEventBody(
|
|
636
638
|
description="Step out",
|
|
637
639
|
reason=StoppedReason.STEP,
|
|
638
|
-
thread_id=
|
|
640
|
+
thread_id=self.main_thread_id,
|
|
639
641
|
)
|
|
640
642
|
),
|
|
641
643
|
)
|
|
@@ -708,7 +710,7 @@ class Debugger:
|
|
|
708
710
|
body=StoppedEventBody(
|
|
709
711
|
description="Breakpoint hit",
|
|
710
712
|
reason=StoppedReason.BREAKPOINT,
|
|
711
|
-
thread_id=
|
|
713
|
+
thread_id=self.main_thread_id,
|
|
712
714
|
hit_breakpoint_ids=[breakpoint_id_manager.get_id(v) for v in breakpoints],
|
|
713
715
|
)
|
|
714
716
|
),
|
|
@@ -747,7 +749,7 @@ class Debugger:
|
|
|
747
749
|
StoppedEvent(
|
|
748
750
|
body=StoppedEventBody(
|
|
749
751
|
reason=reason,
|
|
750
|
-
thread_id=
|
|
752
|
+
thread_id=self.main_thread_id,
|
|
751
753
|
description=description,
|
|
752
754
|
text=text,
|
|
753
755
|
)
|
|
@@ -782,12 +784,12 @@ class Debugger:
|
|
|
782
784
|
if self.requested_state == RequestedState.Running:
|
|
783
785
|
self.requested_state = RequestedState.Nothing
|
|
784
786
|
self.state = State.Running
|
|
785
|
-
if self.
|
|
787
|
+
if self.main_thread_is_alive:
|
|
786
788
|
self.send_event(
|
|
787
789
|
self,
|
|
788
790
|
ContinuedEvent(
|
|
789
791
|
body=ContinuedEventBody(
|
|
790
|
-
thread_id=self.
|
|
792
|
+
thread_id=self.main_thread_id,
|
|
791
793
|
all_threads_continued=True,
|
|
792
794
|
)
|
|
793
795
|
),
|
|
@@ -947,7 +949,7 @@ class Debugger:
|
|
|
947
949
|
StoppedEvent(
|
|
948
950
|
body=StoppedEventBody(
|
|
949
951
|
reason=StoppedReason.ENTRY,
|
|
950
|
-
thread_id=
|
|
952
|
+
thread_id=self.main_thread_id,
|
|
951
953
|
)
|
|
952
954
|
),
|
|
953
955
|
)
|
|
@@ -1221,15 +1223,25 @@ class Debugger:
|
|
|
1221
1223
|
def set_main_thread(self, thread: threading.Thread) -> None:
|
|
1222
1224
|
self.main_thread = thread
|
|
1223
1225
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
+
@property
|
|
1227
|
+
def main_thread_id(self) -> int:
|
|
1228
|
+
return 1 if self.main_thread_is_alive else 0
|
|
1226
1229
|
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1230
|
+
@property
|
|
1231
|
+
def main_thread_is_alive(self) -> bool:
|
|
1232
|
+
return self.main_thread is not None and self.main_thread.is_alive()
|
|
1233
|
+
|
|
1234
|
+
def get_threads(self) -> List[Thread]:
|
|
1235
|
+
return (
|
|
1236
|
+
[
|
|
1237
|
+
Thread(
|
|
1238
|
+
id=self.main_thread_id,
|
|
1239
|
+
name="RobotMain",
|
|
1240
|
+
)
|
|
1241
|
+
]
|
|
1242
|
+
if self.main_thread_is_alive
|
|
1243
|
+
else []
|
|
1244
|
+
)
|
|
1233
1245
|
|
|
1234
1246
|
WINDOW_PATH_REGEX: ClassVar = re.compile(r"^(([a-z]:[\\/])|(\\\\)).*$", re.RegexFlag.IGNORECASE)
|
|
1235
1247
|
|
|
@@ -1281,8 +1293,7 @@ class Debugger:
|
|
|
1281
1293
|
levels: Optional[int] = None,
|
|
1282
1294
|
format: Optional[StackFrameFormat] = None,
|
|
1283
1295
|
) -> StackTraceResult:
|
|
1284
|
-
|
|
1285
|
-
raise InvalidThreadIdError(thread_id)
|
|
1296
|
+
self.check_thread_id(thread_id)
|
|
1286
1297
|
|
|
1287
1298
|
start_frame = start_frame or 0
|
|
1288
1299
|
levels = start_frame + (levels or len(self.stack_frames))
|
|
@@ -118,16 +118,17 @@ def start_debugpy(
|
|
|
118
118
|
global config_done_callback
|
|
119
119
|
|
|
120
120
|
def connect_debugpy(server: "DebugAdapterServer") -> None:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
if not os.environ.get("DEBUGPY_ADAPTER_ENDPOINTS", None):
|
|
122
|
+
server.protocol.send_event(
|
|
123
|
+
Event(
|
|
124
|
+
event="debugpyStarted",
|
|
125
|
+
body={
|
|
126
|
+
"port": port,
|
|
127
|
+
"addresses": addresses,
|
|
128
|
+
"processId": os.getpid(),
|
|
129
|
+
},
|
|
130
|
+
)
|
|
129
131
|
)
|
|
130
|
-
)
|
|
131
132
|
|
|
132
133
|
if wait_for_debugpy_client:
|
|
133
134
|
app.verbose(f"Wait for debugpy incomming connections listening on {addresses}:{port}")
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.108.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/dap_types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/id_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/cli.py
RENAMED
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/client.py
RENAMED
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/run.py
RENAMED
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/launcher/server.py
RENAMED
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/listeners.py
RENAMED
|
File without changes
|
{robotcode_debugger-0.108.1 → robotcode_debugger-0.109.1}/src/robotcode/debugger/protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|