From f3d3da9a7046147434d6702bfb5a4a30e74cfe3d Mon Sep 17 00:00:00 2001 From: Miha Krajnc Date: Tue, 18 Feb 2025 11:23:24 +0100 Subject: [PATCH] Add a callback and print out the error from executor --- DGVisualStudioCodeIntegration.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DGVisualStudioCodeIntegration.pas b/DGVisualStudioCodeIntegration.pas index 60246cd..db15e78 100644 --- a/DGVisualStudioCodeIntegration.pas +++ b/DGVisualStudioCodeIntegration.pas @@ -141,7 +141,11 @@ procedure OpenCurrentFileInVisualStudioCode; try executor.WorkDir := ExtractFilePath(filename); executor.CmdLine := Cmdline; - executor.Execute; + executor.Execute( + procedure(Txt: string) + begin + ShowMessage(Format('Execution error: %s', [Txt])); + end, nil); finally executor.Free; end;