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
  • 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
WEBDEV - Server codeWEBDEV - Browser codeAjax
// Ouvre la fenêtre de trace
TraceStart()
...
// Ecrit dans la fenêtre de trace
Trace("Résultat du calcul : " + ResCalcul)
WEBDEV - Server codeAjax
// Désactiver les appels à la fonction Trace
TraceStart(trDisable)
...
Trace("Résultat du calcul : " + ResCalcul) // Fonction Trace sans effet
WEBDEV - Server codeAjax
// Enregistre les informations contenues dans 
// la fenêtre de trace dans le fichier "C:\Trace\MonFichier.txt"
TraceStart(trFile, "C:\Trace\MonFichier.txt")
...
Trace("Résultat du calcul : " + ResCalcul) 
// Aucune fenêtre de trace n'est affichée
// Cette information sera enregistrée dans le fichier "C:\Trace\MonFichier.txt"
Syntax
TraceStart([<Characteristic>])
<Characteristic>: Optional constant
Trace characteristics:
trConsoleThe trace data is sent to the console.
WEBDEV - Server codeWEBDEV - Browser codePHP This constant is not available.
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>.
Linux Only this constant is available. By default, this file is created in the UNIX temporary directory with the name "Trace_<Project>.txt".

WEBDEV - Server code In AWPmode, only this constant is available.
trTopMostThe trace window will be displayed above all system windows.
PHP This constant is not available.
trWindow
(Default value)
The trace window is displayed in the upper-left corner of the screen.


WEBDEV - Server code When deploying a site, the trace window is not displayed.

PHP The trace is displayed in the current page.
trWindow + trFileThe trace window will be displayed and the content of the trace window will also be saved in the file named <Trace file>.
PHP The trace is displayed in the current page and in a file.
WEBDEV - Browser code This parameter is not available.
Remarks

Use conditions according to the platforms

Linux TraceStart is used to save the requested information in a file. By default, this file is created in the UNIX temporary directory with the name "Trace_<Project>.txt".
PHP TraceStart is used to display the requested information in the current page or to store it in a file.
WEBDEV - Server code In AWP mode, TraceStart can only be used to save the requested information in a 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.
WEBDEV - Server codeWEBDEV - Browser codeAjax

Trace window

The trace window displayed from a Browser code is different from the one displayed from a Server code. Therefore, two different trace windows can be opened at the same time.
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