winIDEA SDK
test_set_bp_condition.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_set_bp_condition():
12 conn_mgr = ic.ConnectionMgr()
13 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 bp_ctrl = ic.CBreakpointController(conn_mgr)
16 bp_handle = bp_ctrl.set_BP_symbol("init_globals")
17
18 bp_condition = "main_loop_counter > 10"
19 bp_ctrl.set_BP_condition(bp_handle, 1, bp_condition)
20 print(f"Condition '{bp_condition}' is set for breakpoint at function 'init_globals'.")
21
22
23if __name__ == "__main__":
24 test_set_bp_condition()