mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 18:20:34 +02:00
Debugger/Project Settings: Fix updating when changing project / fix config frame (wrong warning hint)
This commit is contained in:
parent
3c41d81f5d
commit
ca4e2cb5c5
@ -130,6 +130,7 @@ begin
|
||||
FDebuggerBackendUnknown := FDebuggerBackend;
|
||||
end;
|
||||
cbProjectDebugger.ItemIndex := sel;
|
||||
UpdateResolvedDebuggerHint;
|
||||
end;
|
||||
|
||||
procedure TProjectDebugOptionsFrame.UpdateResolvedDebuggerHint;
|
||||
|
@ -83,6 +83,7 @@ type
|
||||
XML_PATH_DEBUGGER_CONF = 'Config[%d]/';
|
||||
XML_PATH_DEBUGGER_CONF_OLD = 'Class%s/';
|
||||
private
|
||||
FIsGlobalList: boolean;
|
||||
FForcedUnsuitableClass: TDebuggerClass;
|
||||
FHasActiveDebuggerEntry: Boolean;
|
||||
FKnownDebuggerClassCount: Integer;
|
||||
@ -94,7 +95,7 @@ type
|
||||
protected
|
||||
property HasActiveDebuggerEntry: Boolean read FHasActiveDebuggerEntry write FHasActiveDebuggerEntry; // for the initial setup dialog / entry may be of unknown class
|
||||
public
|
||||
constructor Create;
|
||||
constructor Create(AnIsGlobalList: boolean = False);
|
||||
destructor Destroy; override;
|
||||
procedure Clear; override;
|
||||
procedure LoadFromXml(AXMLCfg: TRttiXMLConfig; APath: String);
|
||||
@ -614,7 +615,7 @@ procedure TDebuggerPropertiesConfigList.SetCurrentDebuggerPropertiesOpt(
|
||||
AValue: TDebuggerPropertiesConfig);
|
||||
begin
|
||||
if FCurrentDebuggerPropertiesConfig = AValue then Exit;
|
||||
assert(AValue.IsLoaded, 'TDebuggerPropertiesConfigList.SetCurrentDebuggerPropertiesOpt: AValue.IsLoaded');
|
||||
assert((AValue=nil) or AValue.IsLoaded, 'TDebuggerPropertiesConfigList.SetCurrentDebuggerPropertiesOpt: (AValue.IsLoaded');
|
||||
if (AValue <> nil) and (IndexOfObject(AValue) < 0) then
|
||||
AddEntry(AValue);
|
||||
FCurrentDebuggerPropertiesConfig := AValue;
|
||||
@ -629,8 +630,9 @@ begin
|
||||
FForcedUnsuitableClass := AnEntry.DebuggerClass;
|
||||
end;
|
||||
|
||||
constructor TDebuggerPropertiesConfigList.Create;
|
||||
constructor TDebuggerPropertiesConfigList.Create(AnIsGlobalList: boolean);
|
||||
begin
|
||||
FIsGlobalList := AnIsGlobalList;
|
||||
FUnsuitable := TDebuggerPropertiesConfigListBase.Create;
|
||||
FUnloaded := TDebuggerPropertiesConfigListBase.Create;
|
||||
inherited Create;
|
||||
@ -657,11 +659,13 @@ var
|
||||
Entry: TDebuggerPropertiesConfig;
|
||||
begin
|
||||
// Check if new Debugger-Classes were registered since the last load.
|
||||
if (Count > 0) and
|
||||
(TBaseDebugManagerIntf.DebuggerCount = FKnownDebuggerClassCount)
|
||||
then
|
||||
exit;
|
||||
FKnownDebuggerClassCount := TBaseDebugManagerIntf.DebuggerCount;
|
||||
if FIsGlobalList then begin
|
||||
if (Count > 0) and
|
||||
(TBaseDebugManagerIntf.DebuggerCount = FKnownDebuggerClassCount)
|
||||
then
|
||||
exit;
|
||||
FKnownDebuggerClassCount := TBaseDebugManagerIntf.DebuggerCount;
|
||||
end;
|
||||
HasActiveDebuggerEntry := False;
|
||||
|
||||
|
||||
@ -691,7 +695,7 @@ var
|
||||
nd, nd2: TDOMNode;
|
||||
s: String;
|
||||
begin
|
||||
if (Count > 0) and
|
||||
if (Count > 0) and FIsGlobalList and
|
||||
(TBaseDebugManagerIntf.DebuggerCount = FKnownDebuggerClassCount)
|
||||
then
|
||||
exit;
|
||||
@ -813,7 +817,7 @@ end;
|
||||
constructor TDebuggerOptions.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FDebuggerConfigList := TDebuggerPropertiesConfigList.Create;
|
||||
FDebuggerConfigList := TDebuggerPropertiesConfigList.Create(True);
|
||||
FDisplayFormatConfigs := TDisplayFormatConfig.Create(True);
|
||||
BackendConverterConfig := TIdeDbgValueConvertSelectorList.Create;
|
||||
FValueFormatterConfig := TIdeDbgValueFormatterSelectorList.Create;
|
||||
|
@ -280,16 +280,29 @@ procedure TProjectDebugLink.Clear;
|
||||
begin
|
||||
FUseBackendConverterFromIDE := True;
|
||||
FUseBackendConverterFromProject := True;
|
||||
FStoreBackendConverterConfigInSession := False;
|
||||
|
||||
FUseDisplayFormatConfigsFromIDE := True;
|
||||
FUseDisplayFormatConfigsFromProject := True;
|
||||
FStoreDisplayFormatConfigsInSession := False;
|
||||
|
||||
FUseValueFormatterFromIDE := True;
|
||||
FUseValueFormatterFromProject := True;
|
||||
FStoreValueFormatterConfigInSession := False;
|
||||
|
||||
FDebuggerBackend := '';
|
||||
|
||||
FDebuggerProperties.Clear;
|
||||
FDisplayFormatConfigs.Clear;
|
||||
FValueFormatterConfig.Clear;
|
||||
FBackendConverterConfig.Clear;
|
||||
end;
|
||||
|
||||
procedure TProjectDebugLink.BeforeReadProject;
|
||||
begin
|
||||
FDebuggerClassConfWasFromSession := False;
|
||||
FDebuggerClassConfWasFromLPI := False;
|
||||
FDebuggerBackend := '';
|
||||
end;
|
||||
|
||||
procedure TProjectDebugLink.AfterReadProject;
|
||||
|
Loading…
Reference in New Issue
Block a user