8.8.1.1.2.2.13. Settings¶
- class Settings¶
- getDetailedSettings() list[DebugSetting]¶
Get a detailed list of all debugger settings.
settings = session.settings.getDetailedSettings() # print details of settings for setting in settings: print(f"{setting['id']}:") print(f" type: {setting['type']}") print(f" name: {setting['name']}") print(f" value: {setting['value']}") if 'allowedValues' in setting: print(f" allowedValues: {setting['allowedValues']}") if 'allowedRange' in setting: range = setting['allowedRange'] print(f" allowedRange: [{range['min']}, {range['max']}]") print("")
- Returns:
A list of objects which detail each debugger setting.
- Return type:
list[
DebugSetting]
- get(settingId) bool | int | str¶
Get the value of a specific debugger setting.
# Get a boolean indicating if debugger is configured to auto run to a label on reset autoRun = session.settings.get("AutoRunToLabelOnReset") # print the label (a string) to which the debugger will run to on a restart or reset (if configured to do so) print(session.settings.get("AutoRunToLabelName"))
- Parameters:
settingId (str) -- The identifier for the desired setting.
- Returns:
The value of the setting.
- Return type:
bool | int | str
- set(settingId, value) None¶
Set the value of a specific debugger setting.
# Configure the debugger to auto-run to a label named SYSCFG_DL_init on reset session.settings.set("AutoRunToLabelName", "SYSCFG_DL_init") session.settings.set("AutoRunToLabelOnReset", True)
- Parameters:
settingId (str) -- The identifier for the desired setting.
value (bool | int | str) -- The new value of the setting.
- Return type:
None