OutputDebugString () with Delphi for MacOS

Is there an NSLog ad in Delphi OSX units? I could not find the OutputDebugString submenu in the Firemonkey application.

The final solution is as follows:

/// <remarks> /// Output debug string. Output debug string can be seen in Delphi /// View|Debug Windows|Event Log or with 3-rd party programs such as /// dbgview.exe from SysInternals (www.sysinternals.com) /// </remarks> procedure ODS(const Text: string); begin {$IFDEF MACOS} // http://stackoverflow.com/questions/12405447/outputdebugstring-with-delphi-for-macosunit unt_Debug; Log.d(Text); {$ENDIF} {$IFDEF LINUX} __write(stderr, AText, Length(AText)); __write(stderr, EOL, Length(EOL)); {$ENDIF} {$IFDEF MSWINDOWS} OutputDebugString(PWideChar(Text)); {$ENDIF} end; 
+4
source share
1 answer

In Firemonkey, a portable way to display a message in the Log.d event log is :

  uses FMX.Types; ... Log.d('debugging'); 

I think it is available from XE3 onwards.

+4
source

Source: https://habr.com/ru/post/1433994/


All Articles