ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Use conditions according to the platforms
  • Closing the trace window
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 17 (78), StartTrace is kept for backward compatibility. This function has been replaced with TraceStart.
Opens the trace window or saves the trace information in a text file.
Remarks:
  • TraceStart has no effect if the trace window is already opened.
  • TraceStart is optional. The first call to Trace or to TraceBuild automatically opens the trace window.
Example
iPhone/iPadApple Watch
// Ouvre la fenêtre de trace
TraceStart()
...
// Ecrit dans la fenêtre de trace
Trace("Résultat du calcul : " + ResCalcul)
iPhone/iPadApple Watch
// Désactiver les appels à la fonction Trace
TraceStart(trDisable)
...
Trace("Résultat du calcul : " + ResCalcul) // Fonction Trace sans effet
Syntax
TraceStart([<Characteristic> [, <Trace file>]])
<Characteristic>: Optional constant
Trace characteristics:
trConsoleThe trace data is sent to the console.
AndroidAndroid Widget iPhone/iPadApple Watch This constant is not available.
New in SaaS
AndroidAndroid Widget iPhone/iPadApple Watch The constant trConsole corresponds to the default value. The trace window will not be displayed.
  • iPhone/iPadApple Watch the requested information will be displayed in Xcode's standard output window.
  • AndroidAndroid Widget the requested information will be stored in the application log (at runtime or in emulation mode). This log can be viewed when the device is connected via USB or when using the emulator from the DDMS application provided with the Android SDK.
Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 3.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
trCreationClears the trace file.
trDisableAll the calls to Trace will be ignored.
trFileThe trace window will not be displayed anymore and the information found in the trace window will be saved in the file named <Trace file>.

trTopMostThe trace window will be displayed above all system windows.
AndroidAndroid Widget iPhone/iPadApple Watch This constant is not available.
trWindow
(Default value)
The trace window is displayed in the upper-left corner of the screen.

AndroidAndroid Widget iPhone/iPadApple Watch The trace window will not be displayed when starting the application.
  • iPhone/iPadApple Watch the requested information will be displayed in the window for standard output of Xcode.
  • AndroidAndroid Widget the requested information will be stored in the application log (at runtime or in emulation mode). This log can be viewed when the device is connected via USB or when using the emulator from the DDMS application provided with the Android SDK.
New in SaaS
AndroidAndroid Widget iPhone/iPadApple Watch When testing on the mobilethe trace window is displayed on the device (test via WMDev (for iOS applications), via USB or Wi-Fi).
When running on thethe trace window will be displayed.
Warning: the constant trWindow constant does not correspond to the default value. Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 3.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.


trWindow + trFileThe trace window will be displayed and the content of the trace window will also be saved in the file named <Trace file>.
<Trace file>: Optional character string
Name and full path of the file where the information found in the trace window will be saved. If this parameter is not specified, the trace file will be created at the root of the "C" drive and its name will have the following format "Trace_<ProjectName>.txt".
AndroidAndroid Widget If this parameter is not specified, the file is created in the current directory of the application (known via fCurrentDir) under the name, "Trace_<ProjectName>.txt".
iPhone/iPadApple Watch If this parameter is not specified, the file is created in the "documents" directory of the application and it is named "Trace_<ProjectName>.txt".
Remarks

Use conditions according to the platforms

AndroidAndroid Widget The function TraceStart function is used to record the requested information:
  • in the application log (at runtime or in emulator mode). This log can be viewed when the device is connected via USB or when using the emulator from the DDMS application provided with the Android SDK.
  • in a specific text file.
iPhone/iPadApple Watch The function TraceStart function:
  • display the requested information in the window for standard output of Xcode.
  • save the requested information in a specific text file.

Closing the trace window

TraceEnd is used to close the trace window.
If the trFile constant is specified, TraceEnd stops saving to the trace file.
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video Trace
https://youtu.be/scI5wQu-jXk
//
fDelete("C:\TEMP\ARQUIVO.TXT") // ELIMINA ARQUIVOS CASO JA EXISTA
TraceStart(trFile+trWindow,"C:\TEMP\ARQUIVO.TXT")
FOR EACH cliente // ESTOU PERCORRENDO A TABELA CLIENTE // I AM PERCURRING THE CLIENT TABLE // Je passe à la table des clients
Trace(cliente.id_cliente+"|"+cliente.razao_social_nome+"|")
END
TraceEnd() // FINALIZANDO O TRACE // FINISHING THE TRACE // FINITION DE LA TRACE
ShellExecute("C:\TEMP\ARQUIVO.TXT")
amarildo
30 Dec. 2018

Last update: 05/15/2025

Send a report | Local help