Table of Contents


Using IDE Tools

The Integrated Development Environment provides three essential tools that support development, debugging, and resource discovery activities: Event Logs for debugging and execution tracing, Query Console for data exploration and query testing, and Font Icons for browsing and implementing visual elements. Understanding these integrated tools enables efficient troubleshooting, data verification, and resource utilization throughout the development lifecycle without requiring external applications or separate tool installations.

These tools are accessible through the Tools menu in the IDE, providing convenient access to debugging capabilities, data query functionality, and icon resources while maintaining active development context and workspace state.

Accessing IDE Tools

Tools Menu Navigation

Access the Tools menu in the IDE menu bar at the top of the interface. The Tools menu appears alongside File, Window, and Help menus providing access to IDE functionality and resources.

Click the Tools menu to display the dropdown menu containing available tool options. The menu displays three primary tools: Event Logs, Query Console, and Font Icons.

Tool Opening: Select any tool from the Tools menu to open that tool in a new browser tab. Tools open in separate tabs rather than within the IDE interface, enabling full-screen tool usage while maintaining the IDE workspace in its original tab.

Multiple Tool Access: Multiple tools can be open simultaneously in different browser tabs. Developers can switch between the IDE, Event Logs, Query Console, and Font Icons as needed during development activities without closing and reopening tools.

Context Preservation: Opening tools in new tabs preserves the IDE workspace state including open files, unsaved changes, cursor positions, and sidebar navigation state. Returning to the IDE tab after using tools enables immediate continuation of development work without context loss.

Event Logs

Purpose and Functionality

Event Logs provide real-time visibility into custom code execution, system errors, developer-inserted log statements, and platform operations. Since the Magentrix IDE does not include interactive debugging capabilities with breakpoints, variable inspection, or step-through execution, Event Logs serve as the primary debugging mechanism for troubleshooting code issues and verifying logic implementation.

Debugging Primary Tool: Developers insert log statements strategically throughout controller, class, and trigger code during development to capture execution flow, variable values, conditional logic outcomes, and error conditions. Event Log entries created by these statements provide insight into code behavior and enable identification of logic errors or unexpected conditions.

Error Tracking: System errors, exceptions thrown by custom code, compilation failures in dynamic code execution, and platform-level issues appear in Event Logs with detailed error messages, stack traces, and context information enabling error identification and resolution.

Performance Monitoring: Event Logs capture execution timing information, enabling identification of performance bottlenecks, slow operations, or inefficient code patterns that impact user experience or system resource consumption.

Accessing Event Logs

Select Event Logs from the Tools menu to open the Event Log interface in a new browser tab. The Event Log interface displays a tabular view of log entries with columns for Actions, Description, Type, User, and Created Date.

Recent Entries Display: Event Logs display recent entries with the most recent entries typically appearing at the top of the list. The log maintains a history of entries enabling review of execution sequences and error patterns over time.

Refresh Capability: Event Log interfaces typically include a Refresh button that reloads the log display to show newly created entries since the last page load. Regular refreshing during development enables monitoring of log output from code currently being tested.

Event Log Structure

Actions Column: Displays available actions for each log entry, typically including a Delete option for removing individual entries. Individual entry deletion enables selective cleanup of specific entries while preserving other log information.

Description Column: Contains the log message text including developer-inserted messages, error descriptions, stack traces, or system messages describing logged events. Description content provides the primary diagnostic information for debugging activities.

Type Column: Indicates the log entry type such as Error for error conditions and exceptions, Information for informational messages, Warning for warning conditions, or other type classifications that categorize log entries by severity or purpose.

User Column: Shows the user account associated with the logged event, identifying which user's actions triggered code execution that generated the log entry. User identification helps correlate log entries with specific user activities during testing or troubleshooting.

Created Date Column: Displays the date and time when the log entry was created, enabling temporal correlation of events, identification of event sequences, and filtering of log entries by time period.

Searching Event Logs

The Event Log interface includes search functionality enabling filtering of log entries by keyword rather than manually scanning through complete log histories.

Search Field: Enter search terms in the search field to filter displayed log entries. Search operates on Description column content, matching entries that contain the specified search text.

Use Cases: Search functionality enables quick location of specific error messages, filtering for log entries from specific code sections identified by unique log message text, finding all entries related to particular records or operations, and focusing on relevant entries when logs contain numerous unrelated messages.

Search Clearing: Clear the search field to restore the complete unfiltered log display. Most search implementations provide a clear button or icon within the search field for quick search term removal.

Clearing Event Logs

The Event Log interface provides a Clear Logs button that removes all log entries from the Event Log table. Clearing logs removes clutter, improves log readability for new debugging sessions, and prevents log table growth that could impact system performance.

Complete Removal: The Clear Logs operation removes all entries regardless of type, user, or date. Selective preservation of specific entries is not available; clearing is an all-or-nothing operation that removes the entire log history.

Pre-Clear Review: Before clearing logs, review and copy any important diagnostic information, error messages, or execution traces that may be needed for future reference. Cleared log entries cannot be recovered.

Regular Cleanup: Implement regular log clearing practices during development to prevent Event Log table growth. Accumulated log entries from extensive debugging sessions consume database storage and may impact log query performance.

Implementing Logging in Code

Developers insert log statements in controller, class, and trigger code using Magentrix SDK logging methods. Log statements execute during code execution, creating Event Log entries with specified messages and information.

Strategic Placement: Insert log statements at key execution points including method entry and exit, before and after critical operations, in conditional branches to verify which paths execute, before and after database queries, and in exception catch blocks to log error details.

Informative Messages: Write log messages that clearly communicate execution context, include relevant variable values, describe operations being performed, and provide sufficient detail for debugging without requiring code inspection to understand message meaning.

Variable Value Logging: Include variable values in log messages to verify data content and identify unexpected values. Use string concatenation or formatting to construct messages like "Account Name: " + accountName or "Record Count: " + records.Count.

Conditional Logging: Consider implementing conditional logging that only creates log entries when specific conditions exist, such as error conditions, unexpected values, or debug flags. Conditional logging reduces log volume while capturing relevant diagnostic information.

Event Log Best Practices

Development vs. Production: Use extensive logging during development to understand code behavior and identify issues. Remove or disable logging statements before deploying to production to prevent unnecessary log generation that impacts performance and database storage.

Performance Impact: Excessive logging operations impact code performance and increase database operations. Limit logging to essential diagnostic points and avoid logging inside loops that execute numerous iterations or in code paths that execute very frequently.

Log Cleanup Discipline: Clear Event Logs regularly during development to maintain manageable log sizes and improve log readability. Establish practices for log review and clearing at the end of development sessions or before beginning new debugging activities.

Error Logging Strategy: Always log exceptions and error conditions with sufficient detail for diagnosis including error messages, affected record identifiers, operation context, and relevant variable values. Comprehensive error logging accelerates troubleshooting of production issues.

Sensitive Data Protection: Avoid logging sensitive information including passwords, credit card numbers, social security numbers, or other confidential data. Log entries may be visible to administrators and should not expose sensitive information unnecessarily.

Query Console

Purpose and Functionality

The Query Console enables developers to execute Magentrix SQL queries directly within the IDE environment, providing immediate visibility into entity data without requiring external database tools, custom page development, or complex code implementation. This integrated query capability supports data verification during development, query syntax testing before implementing in code, schema exploration through data sampling, troubleshooting of data-related issues, and verification of business logic results.

Development Support: Developers use the Query Console to verify that data exists as expected, test query syntax before incorporating into controllers or classes, explore entity relationships through relationship traversal queries, and validate that business logic produces correct data outcomes.

Testing Capability: Query Console enables testing of WHERE clause conditions, ORDER BY sorting, LIMIT and SKIP pagination, and relationship traversal paths in an interactive environment before committing queries to code.

Accessing Query Console

Select Query Console from the Tools menu to open the Query Console interface in a new browser tab. The Query Console interface displays a query editor area for entering Magentrix SQL statements and a results display area showing query output.

Interface Layout: The Query Console typically uses a split-pane layout with the query editor in the upper portion and results display in the lower portion. This layout enables viewing queries and their results simultaneously without scrolling.

New Tab Opening: Query Console opens in a new browser tab separate from the IDE workspace, providing full-screen space for query development and result analysis while preserving IDE workspace state in the original tab.

Writing and Executing Queries

Enter Magentrix SQL query statements in the query editor area. The editor accepts standard Magentrix SQL syntax including SELECT statements, FROM clauses, WHERE conditions, ORDER BY sorting, and LIMIT/SKIP pagination.

Query Execution: Execute queries using an Execute or Run button in the Query Console interface, or through keyboard shortcuts if available. Query execution submits the query to the Magentrix platform and displays results in the results area.

Syntax Reference: For complete Magentrix SQL syntax, supported features, functions, operators, and examples, reference the Magentrix SQL Reference documentation. See Magentrix SQL Reference.

Query Examples:

SELECT Id, Name FROM Account

SELECT Id, Name, Email FROM Contact WHERE Email != null

SELECT Id, Name, Account.Name FROM Contact WHERE Account.Type = "Partner" ORDER BY CreatedOn DESC LIMIT 10

Viewing Query Results

Query results appear in a tabular format in the results display area below the query editor. The results table includes columns for each field specified in the SELECT clause with column headers showing field names.

Row Count Display: The Query Console displays the number of rows returned by the query, typically shown above or below the results table. Row count information helps verify query results against expectations and understand data volume.

Scrollable Results: Results tables support scrolling for queries that return more rows than fit in the visible display area. Horizontal scrolling may be available for queries selecting numerous fields that exceed display width.

Column Headers: Results display field names as column headers using the exact field API names specified in the SELECT clause. Header names match query syntax enabling clear correlation between query fields and result columns.

Query Console Limitations

No Export Capability: The Query Console does not provide built-in export functionality for saving query results to files. Results viewing is limited to on-screen display without CSV export, Excel generation, or other output format options.

Result Set Size: Query Console may impose limits on the maximum number of rows displayed or returned from queries. Use LIMIT clauses to retrieve manageable result set sizes when querying entities with large record counts.

Read-Only Access: Query Console supports SELECT queries only without support for INSERT, UPDATE, DELETE, or other data modification operations. Data manipulation must occur through controller, class, or trigger code rather than through Query Console operations.

No Saved Queries: Query Console typically does not provide query saving or query history functionality. Developers must maintain frequently used queries in external documents or code files for reuse across sessions.

Query Development Workflow

Incremental Construction: Build complex queries incrementally by starting with simple SELECT and FROM clauses, adding WHERE conditions progressively, testing after each addition to verify expected filtering, adding ORDER BY and LIMIT clauses after confirming basic query logic, and refining until query produces desired results.

Syntax Validation: Use Query Console to validate query syntax before incorporating queries into code. Syntax errors discovered in Query Console are easier to correct than compilation errors in controller or class code.

Result Verification: Compare query results against expected data to verify WHERE clause logic, confirm relationship traversal produces correct related data, validate ORDER BY sorting produces expected sequence, and ensure LIMIT/SKIP pagination returns appropriate record subsets.

Performance Testing: Observe query execution time and result set sizes to identify performance concerns. Queries that execute slowly in Query Console will also perform poorly when incorporated into page or background code.

Integration with Development

Pre-Implementation Testing: Test queries in Query Console before implementing them in controllers, classes, or triggers. Validated queries can be directly copied from Query Console into code with confidence in their correctness.

Data Verification: Use Query Console during development to verify that business logic produces expected data outcomes, confirm that trigger modifications created correct field values, validate that controller logic queried correct records, and ensure data relationships are established properly.

Troubleshooting Support: When investigating data-related issues, use Query Console to examine current data state, verify field values in question, explore relationship connections, and identify data inconsistencies or unexpected values.

Documentation: Include example Query Console queries in documentation to demonstrate data structures, illustrate relationship traversal patterns, show expected data formats, and provide reference queries that administrators or developers can use for data exploration.

Font Icons

Purpose and Functionality

The Font Icon library provides browsable access to a collection of commonly used glyphicons suitable for enhancing portal user interfaces with visual elements. These icons support consistent visual communication, improved user experience through recognizable symbols, enhanced navigation and button identification, and professional appearance in portal customizations.

Icon Discovery: Developers browse the Font Icon library to identify appropriate icons for various interface elements, discover available symbols for specific purposes, and locate alternative icons when primary choices are unavailable.

HTML Implementation: The Font Icon library provides HTML code for implementing icons in Active Pages and Templates. Icons are implemented through HTML markup rather than image files, enabling scalability, styling flexibility, and efficient delivery.

Accessing Font Icons

Select Font Icons from the Tools menu to open the Font Icon library interface in a new browser tab. The interface displays a visual grid or gallery of available icons, showing icon appearance and enabling browsing through the collection.

Visual Layout: Icons appear in a grid layout displaying multiple icons per row, enabling efficient scanning of available options and visual comparison of similar icons to select the most appropriate symbol for specific use cases.

Icon Categories: The Font Icon library may organize icons into categories such as General Icons, Navigation Icons, Communication Icons, Action Icons, or other logical groupings. Categories help narrow the browsing scope when searching for icons with specific purposes.

Browsing Icons

Scroll through the displayed icon grid to view available icons. The library includes a diverse collection covering common user interface needs including navigation arrows and indicators, communication symbols, action icons, status indicators, business and commerce symbols, social media icons, and general purpose symbols.

Search Functionality: The Font Icon interface includes a search field enabling keyword-based icon location. Enter terms describing desired icon purposes or appearances to filter displayed icons matching search criteria.

Visual Identification: Icons display their visual appearance in the grid, enabling recognition-based selection. Visual display is more efficient than text-only lists when developers know the desired icon appearance but not its specific name.

Obtaining Icon HTML Code

Hover the mouse cursor over any icon in the Font Icon library to display a tooltip containing the HTML code required to implement that icon in pages or templates.

Tooltip Display: The tooltip appears after a brief hover delay, typically showing complete HTML markup including element tags, class attributes, and any other required attributes for proper icon rendering.

HTML Format: Icon HTML typically uses standard glyph icon formats such as <span> elements with specific class names, <i> elements with icon class names, or other markup patterns depending on the underlying icon library implementation.

Manual Copying: The Font Icon library does not include a copy-to-clipboard button or automatic copying functionality. Developers must manually copy the displayed HTML code from the tooltip for use in pages and templates.

Copying Icon Code

To copy icon HTML code for use in pages or templates, carefully select the HTML text displayed in the tooltip using mouse selection techniques. Copy the selected text using standard copy operations (Ctrl+C on Windows/Linux, Command+C on macOS, or right-click Copy).

Accuracy Requirement: Manual copying requires care to ensure complete and accurate HTML text selection. Incomplete selection or inclusion of tooltip formatting can result in invalid HTML code that does not render icons correctly.

Transcription Errors: Manual copying introduces risk of transcription errors including missing characters, incorrect attribute names, or malformed markup. Carefully verify copied code before saving pages to catch copying mistakes.

Paste and Verify: After pasting copied icon HTML into page or template code, verify the pasted markup for completeness and correctness. Test page rendering to ensure icons display as expected with proper appearance and positioning.

Implementing Icons in Pages

Paste copied icon HTML code into Active Pages or Templates at appropriate locations within page markup. Icons typically appear inline within text, inside buttons or links, as decorative elements in headers or lists, or as visual indicators next to form fields or messages.

Positioning: Position icon HTML within surrounding markup to achieve desired layout and appearance. Icons may require wrapper elements, spacing adjustments, or CSS styling to integrate properly with page design.

Styling: Apply CSS classes or inline styles to icon elements to adjust size, color, alignment, or other visual properties. Icon customization enables consistent integration with portal design themes and specific component requirements.

Accessibility: Include appropriate accessibility attributes such as aria-hidden or role attributes on decorative icons, and ensure that icons used for meaningful content have appropriate text alternatives or ARIA labels for screen reader users.

Icon Library Characteristics

Glyphicon Collection: The Font Icon library provides standard glyphicons commonly used in web interfaces. The collection focuses on practical, widely recognized symbols rather than specialized or niche iconography.

No External Documentation: The Font Icon library within the IDE provides self-contained browsing and code access without requiring external documentation or separate reference materials. All necessary information for icon implementation is available through tooltip HTML display.

Limited Customization: Icons are provided with standard HTML implementation code. Advanced customization including icon modification, combination, or animation requires additional CSS or JavaScript implementation beyond the basic HTML provided by the library.

Tool Usage Best Practices

Event Log Management

Session-Based Clearing: Clear Event Logs at the beginning of focused debugging sessions to ensure displayed entries relate to current work rather than previous activities. Session-based clearing improves log readability and focus.

Meaningful Log Messages: Write log messages that provide sufficient context and information for debugging without requiring code inspection. Include operation descriptions, relevant identifiers, and state information in messages.

Production Code Cleanup: Remove or disable debug logging statements before deploying code to production environments. Production logging should focus on errors and critical events rather than detailed execution tracing used during development.

Query Console Usage

Syntax Testing: Always test query syntax in Query Console before implementing queries in code. Interactive testing identifies syntax errors, relationship traversal issues, and unexpected results more efficiently than code compilation and execution testing.

Result Set Management: Use LIMIT clauses in Query Console testing to retrieve manageable result sets. Large result sets are difficult to review and may impact Query Console performance.

Query Documentation: Maintain a collection of useful queries in external documents or code comments for future reference. Since Query Console does not save queries, external storage enables query reuse across development sessions.

Font Icon Implementation

Verification After Copying: Always verify copied icon HTML code for completeness and accuracy before saving pages. Visual verification of pasted code catches copying errors before they cause rendering issues.

Consistent Icon Usage: Establish and follow consistent patterns for icon usage across portal pages including consistent icon sizes, colors, and positioning. Consistency improves user experience and professional appearance.

Alternative Text: Provide text alternatives or tooltips for icons that convey meaningful information rather than purely decorative purposes. Alternative text supports accessibility and clarifies icon meaning for users.

Cross-Tool Workflows

Event Log and Query Console Combination: Use Query Console to verify data state when Event Log entries indicate unexpected data values or conditions. Query verification helps distinguish between logic errors and data issues.

Development Iteration: Implement typical development workflows including writing code in the IDE, testing execution and reviewing Event Logs for errors or unexpected behavior, using Query Console to verify data outcomes, refining code based on findings, and repeating until functionality is correct.

Resource Discovery: Browse Font Icons during interface design planning before implementing page markup. Early icon identification enables HTML code preparation and integration planning during page development.

Troubleshooting Common Issues

Event Log Issues

Missing Log Entries: If expected log entries do not appear, verify that code containing log statements executed (check user actions or trigger conditions), refresh the Event Log display to show recent entries, confirm log statements use correct syntax and methods, and verify that no errors prevented code execution before log statements.

Excessive Log Entries: If Event Logs contain overwhelming numbers of entries, implement conditional logging that only logs when specific conditions exist, remove logging from high-frequency code paths like loops, clear logs more frequently during development, and review logging strategy to focus on essential diagnostic information.

Query Console Issues

Query Syntax Errors: When Query Console returns syntax errors, reference Magentrix SQL documentation to verify syntax correctness, check entity and field name capitalization using Entity Browser, verify that used functions and operators are supported, and test simplified query versions to isolate problematic clauses.

Unexpected Results: If query results differ from expectations, verify WHERE clause logic includes all necessary conditions, confirm that relationship traversal uses correct relationship field names, check that comparison operators and values match field data types, and review ORDER BY and LIMIT clauses for unintended result filtering or ordering.

Font Icon Issues

Icons Not Rendering: When pasted icon HTML does not render correctly, verify that copied HTML is complete and properly formatted, ensure that required icon library CSS is loaded by the page, check browser developer tools console for CSS or resource loading errors, and confirm that icon class names match expected library conventions.

Incorrect Icon Appearance: If icons display but appear wrong, verify that correct icon HTML was copied from the tooltip, ensure no styling conflicts override icon appearance, check that icon size and color CSS is appropriate, and test in different browsers to identify browser-specific rendering issues.


Jump to IDE Checklist

<< Using the Entity Browser | Code Editor Features >>