ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing in PHP
  • Overview
  • How to?
  • Debugging a page in PHP
  • Debugging a project in PHP
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
A site generated in PHP can be debugged in standard WEBDEV mode: The PHP site is simulated in "dynamic WEBDEV pages" mode. You have the ability to test the quality of the WLanguage code before generating the corresponding PHP code.
The principle is straightforward: when a page or a project is started in "PHP debug" mode, the corresponding dynamic pages in WEBDEV are run. You can add breakpoints in the WLanguage code. The debugger is automatically started as soon as a breakpoint is reached.
How to?

Debugging a page in PHP

To debug a page in PHP:
  1. On the "Project" tab, in the "Test mode" group, expand "Test mode" and select "Debug PHP project in simulation mode". This menu option must be selected (a checkmark must be displayed in front of the option).
  2. Run the test of your page ().
  3. Validate the warning message if necessary.
The test of the page is run by the dynamic WEBDEV sever simulating the PHP mode. The WLanguage code is directly run by the WEBDEV application server without being converted to PHP.
The breakpoints found in the code are used to start the debugger.
Remark: This test mode is specific. Differences can be noticed during the actual use in PHP. For more details, see "Limitations".

Debugging a project in PHP

To debug a project in PHP:
  1. On the "Project" tab, in the "Test mode" group, expand "Test mode" and select "Debug PHP project in simulation mode". This menu option must be selected (a checkmark must be displayed in front of the option).
  2. Run the test of your project ().
  3. Validate the warning message if necessary.
The test of the project is run by the dynamic WEBDEV server simulating the PHP mode. The WLanguage code is directly run by the WEBDEV application server without being converted to PHP.
Caution: The home page of the site must be a PHP page.
The breakpoints found in the code are used to start the debugger.
Remark: This test mode is specific. Differences can be noticed during the actual use in PHP. For more details, see "Limitations".
Limitations
During a test in "PHP debug" mode:
  • Test of a PHP site: the home page of your PHP site must be a PHP page.
  • In debug mode, the PHP code directly entered into the site is not run.
  • Access to the MySQL databases:
    • PHP directly accesses MySQL databases. The native MySQL access (and the MySQL client library) is required in debug mode, as the site is tested in dynamic WEBDEV mode.
    • Use of HExecuteQuery and HExecuteSQLQuery: In PHP, the code of the SQL query is not checked by the HFSQL engine. In debug mode, the SQL code is automatically checked and re-interpreted by the HFSQL engine. Differences of behavior can be noticed. A query that operates in PHP may not operate in debug mode.
  • You cannot navigate between PHP pages and static pages.
  • Differences of operating mode may be noticed:
    • the generated images are not supported: the drawing functions are not supported properly in simulation mode.
    • the management mode of URLs differs in dynamic WEBDEV mode and in PHP mode: some direct operations performed on a URL (via URL for example) may not operate in debug mode.
  • An error will be displayed during the test if a WLanguage function is supported in PHP and not in dynamic WEBDEV mode.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 04/13/2023

Send a report | Local help