PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Use conditions according to the platforms
  • Closing the trace window
  • Trace window
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From version 17 (78), StartTrace is kept for backward compatibility. This function is replaced by TraceStart.
Opens the trace window or saves the trace information in a text file.
Notes:
  • TraceStart has no effect if the trace window is already opened.
  • TraceStart is optional. The first call to Trace automatically opens the trace window.TraceStart is optional. The first call to Trace or to TraceBuild automatically opens the trace window.
Example
WEBDEV - Server codeWEBDEV - Browser codeAjax
// Opens the trace window
TraceStart()
...
// Writes into the trace window
Trace("Calculation result: " + ResCalc)
WEBDEV - Server codeAjax
// Disable the calls to the Trace function
TraceStart(trDisable)
...
Trace("Calculation result: " + ResCalc)  // Trace has no effect
WEBDEV - Server codeAjax
// Save the information found in
// the trace window in the "C:\Trace\MyFile.txt" file
TraceStart(trFile, "C:\Trace\MyFile.txt")
...
Trace("Calculation result: " + ResCalc)
// No trace window is displayed
// This information will be saved in the "C:\Trace\MyFile.txt" file
Syntax
TraceStart([<Characteristic>])
<Characteristic>: Optional constant
Characteristics of trace:
trCreationClears the trace file.
trTopMostThe trace window will be displayed above all the system windows.
PHP This constant is not available.
trDisableAll the calls to Trace will be ignored.
trWindow
(Default value)
The trace window is displayed in the top left corner of the screen.
WEBDEV - Server code The trace window will not be displayed when a site is deployed.


PHP The trace is displayed in the current page.
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 and is named "Trace_<Project>.txt".

WEBDEV - Server code In AWP mode, only this constant is available.
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 and is named "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 the backup in the trace file.
WEBDEV - Server codeWEBDEV - Browser codeAjax

Trace window

The trace window displayed from a browser code differs from the trace window displayed from a server code. Therefore, two different trace windows can be opened at the same time.
Component : wd240vm.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