Debugger
1. What is Workcube Debugger?
Workcube Debugger is an advanced code and query analysis tool included in the Workcube architecture (under DEV / Dev Tools / WorkDev) and offered to application developers and system administrators. It monitors page requests, AJAX calls, template run times and database SQL queries running on the ColdFusion infrastructure in real time.
The Debug tool, which can be turned on and off via the control panel in the Workcube architecture; It provides a central control mechanism to detect performance bottlenecks, database slowdowns and errors occurring in Workcube modules.
2. The Importance of Debug for a Business
The healthy functioning of the software and system architecture is critical for the uninterrupted continuation of corporate ERP processes. The main advantages offered by the Workcube Debug module are as follows:
- Performance Optimization: It detects slow SQL queries and sluggish CFM templates that increase page loading times at the millisecond (ms) level.
- Quick Troubleshooting: It minimizes interruptions in the live system by instantly catching incorrect database operations and logical errors. downloads.
- Code Quality and Traceability: It stores the executed code files in a regular request pool (History Pool) and provides direct access to the code related to Monaco Editor integration.
- Security and Authorization Control: Sensitive system data with strict security authorization levels (Module authority 42, Admin or Root authority) that prevent unauthorized users from accessing debug data. protects.
3. Process Flow / Life Cycle in Workcube
The running and monitoring steps of the Workcube Debug mechanism are as follows:
Stage | Module / Document / Object | Description |
|---|---|---|
1. Activating Debug | Right Control Panel (rightBarObjects.cfm) | A developer or user with admin authority turns Debug mode on from the right panel. |
2. Request Capture & Pooling | Session (workcube_debug_history) | As the user performs operations on the site (AJAX or Main Request), the last 15 requests made are memorized with a special filtering mechanism. |
3. Authority & Security Verification | dsp_debug_output.cfm | It is checked whether the accessing user has user_level 42, is_admin authority or Root (userid=1); otherwise access is denied. |
4. Template Analysis (Templates Tab) | Dev Tools / Monaco Editor | The CFM template files called on the page are listed, their running times are analyzed, and if desired, the code can be accessed directly with Monaco Editor. |
5. SQL & Metric Analysis (Queries & Timers Tab) | Workcube Debugger Interface | Executed SQL queries, number of records returned and total execution times are examined with graphical/tabular metrics. |
4. What Should Be Considered When Managing Debug Operations?
A. Authorization and Live Environment Security
The Debug module poses a security risk for sensitive data because it can clearly reveal database queries and data structure. User-based Module 42 authority and Admin controls must be kept active to prevent unauthorized access.
Workcube Tip: The Debug interface only allows access to those with authority number 42 in the session.ep.user_level list, company admins (is_admin eq 1) or the main user (userid eq 1). Module 42 authorization should never be granted to general users in a live environment.
B. Debug Usage Time in Live System
Keeping Debug mode on continuously may create memory load on the session. Although the request pool is limited to the last 15 requests by default, it is recommended to close it after the operation is completed.
C. Review of SQL Queries and Performance Metrics
Queries with high execution time (ms) in the Queries tab indicate missing database indexes or incorrect JOIN structures. The ratio of the number of records returned and the time spent must be analyzed.
D. Monaco Editor and Code Direct Access Integration
Thanks to the Monaco button next to the file paths in the Templates tab, detected slow code can be immediately intervened in the development environment.
Workcube Tip: Thanks to the dev.monaco integration in the template list on the Debug screen, when the Monaco button in the relevant file path is clicked, the code is opened directly in the editor screen. This way, you can fix the error at its source without searching the file directory.