winIDEA SDK
test_get_set_basic_debug_cfg.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_get_set_basic_debug_cfg():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 wksCtrl = ic.CWorkspaceController(connMgr)
16
17 # NOTE: make sure that in `Debug -> Configure Session` you have Basic configuration shown.
18 # If not, click on `Switch to Basic...` at the bottom left.
19 debugCfg: ic.CCfg_debug_basic = wksCtrl.get_cfg_debug()
20 print('{appName}, {deviceName}, {device}, ...'\
21 .format(appName=debugCfg.get_AppName() or 'None', deviceName=debugCfg.get_DeviceName(), device=debugCfg.get_Device()))
22
23 # Now you can change the settings
24 debugCfg.set_AppName('OutOfIdeas')
25 debugCfg.set_Device('x86')
26 debugCfg.set_DeviceName('<DeviceName>')
27
28 # Some other settings you can set
29 # debugCfg.set_CreateSMP(True)
30 # debugCfg.set_SymPath('<path_to_symbols>')
31 # debugCfg.set_UseSymForPgm(False)
32 # debugCfg.set_ReplaceDir('<old_path>=<new_path>;')
33
34 # Apply modified configuration
35 wksCtrl.set_cfg_debug(debugCfg)
36
37if __name__ == "__main__":
38 test_get_set_basic_debug_cfg()