mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-31 12:47:43 +00:00
Fixes #762. The debugger should check that build succeeded before attempting to start.
This commit is contained in:
parent
0cdb3d46c4
commit
2e918ba893
2 changed files with 20 additions and 1 deletions
|
|
@ -564,6 +564,7 @@ uses
|
|||
kmxfile,
|
||||
OnlineConstants,
|
||||
Project,
|
||||
ProjectFileUI,
|
||||
RegExpr,
|
||||
ErrorControlledRegistry,
|
||||
RedistFiles,
|
||||
|
|
@ -989,6 +990,9 @@ procedure TfrmKeymanWizard.StartDebugging(FStartTest: Boolean);
|
|||
ki: TKeyboardInfo;
|
||||
buf: WideString;
|
||||
begin
|
||||
if not FileExists((ProjectFile as TkmnProjectFile).TargetFilename) then
|
||||
Exit(False);
|
||||
|
||||
try
|
||||
GetKeyboardInfo((ProjectFile as TkmnProjectFile).TargetFilename, True, ki); // I4695
|
||||
try
|
||||
|
|
@ -1038,7 +1042,20 @@ begin
|
|||
FDebugForm.CanDebug := True;
|
||||
FDebugForm.UIStatus := duiReadyForInput;
|
||||
(ProjectFileUI as TkmnProjectFileUI).Debug := True; // I4687
|
||||
modActionsKeyboardEditor.actKeyboardCompile.Execute;
|
||||
|
||||
frmMessages.Clear; // I4686
|
||||
|
||||
if not (ProjectFileUI as TkmnProjectFileUI).DoAction(pfaCompile, False) then
|
||||
begin
|
||||
ShowMessage(SKErrorsInCompile);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if not FileExists((ProjectFile as TkmnProjectFile).TargetFilename) then
|
||||
begin
|
||||
ShowMessage(SKKeyboardKMXDoesNotExist);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if not KeyboardContainsDebugInformation then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ interface
|
|||
|
||||
const
|
||||
SKMustIncludeDebug = 'You must include debug information to start the debugger. Check ''Include debug information'' in the Keyboard menu.';
|
||||
SKErrorsInCompile = 'The keyboard did not compile successfully. Unable to start debugger.';
|
||||
SKKeyboardKMXDoesNotExist = 'The keyboard .kmx output file does not exist. The keyboard must target Windows or macOS for interactive debugging.';
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue