Browse Source

!964 Sort watchpoints by id when hitting watchpoints

From: @jiang-shuqiang
Reviewed-by: @wangyue01,@wenkai_dist
Signed-off-by: @wenkai_dist
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
a8b3b7e716
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      mindinsight/debugger/stream_handler/watchpoint_handler.py

+ 5
- 0
mindinsight/debugger/stream_handler/watchpoint_handler.py View File

@@ -446,6 +446,7 @@ class WatchpointHitHandler(StreamHandlerBase):
watch_points.append(watchpoint)

if watch_points:
watch_points.sort(key=_watchpoint_id)
res = {
'slot': slot,
'watch_points': watch_points
@@ -614,6 +615,10 @@ def set_default_param(condition_mgr, watch_condition):
return watch_condition


def _watchpoint_id(watchpoint):
return watchpoint.get('id')


def _get_error_list(error_code):
"""
Get error list.


Loading…
Cancel
Save