winIDEA SDK
Loading...
Searching...
No Matches
test_get_set_basic_debug_cfg.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import isystem.connect as ic
winidea_id = ''
def test_get_set_basic_debug_cfg():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
wksCtrl = ic.CWorkspaceController(connMgr)
# NOTE: make sure that in `Debug -> Configure Session` you have Basic configuration shown.
# If not, click on `Switch to Basic...` at the bottom left.
debugCfg: ic.CCfg_debug_basic = wksCtrl.get_cfg_debug()
print('{appName}, {deviceName}, {device}, ...'\
.format(appName=debugCfg.get_AppName() or 'None', deviceName=debugCfg.get_DeviceName(), device=debugCfg.get_Device()))
# Now you can change the settings
debugCfg.set_AppName('OutOfIdeas')
debugCfg.set_Device('x86')
debugCfg.set_DeviceName('<DeviceName>')
# Some other settings you can set
# debugCfg.set_CreateSMP(True)
# debugCfg.set_SymPath('<path_to_symbols>')
# debugCfg.set_UseSymForPgm(False)
# debugCfg.set_ReplaceDir('<old_path>=<new_path>;')
# Apply modified configuration
wksCtrl.set_cfg_debug(debugCfg)
if __name__ == "__main__":
test_get_set_basic_debug_cfg()