Development Tools Overview
Build Information
Current documentation based on build version: 676042 Last updated: 2025-06-21
System Purpose
The Development Tools category provides essential utilities for DST development, debugging, and performance analysis. These systems enable efficient development workflows and help maintain high-quality code throughout the development process by providing comprehensive debugging capabilities, performance monitoring, and development automation tools.
Key Responsibilities
- Provide debugging and diagnostic capabilities for issue identification and resolution
- Enable performance monitoring and optimization through profiling tools
- Support development workflow automation with console commands and hot-reload systems
- Facilitate code inspection and analysis through comprehensive debugging utilities
- Enable runtime modification and testing through interactive development interfaces
System Scope
This category includes all developer-facing tools but excludes production game features and player-facing functionality. It encompasses debugging utilities, performance analysis tools, development automation, and interactive development interfaces.
Architecture Overview
System Components
Development tools are designed as non-intrusive systems that can be enabled/disabled without affecting core game functionality, providing comprehensive development support while maintaining system stability.
Data Flow
Developer Input → Tool Command → System Analysis → Result Display
↓ ↓ ↓ ↓
Console Input → Debug Hook → Data Collection → Output Format
Integration Points
- All Core Systems: Tools can inspect and debug any system component
- Console Interface: Command-line access to all tool functions
- File System: Tools read/write debug data, logs, and configuration files
- Performance Counters: Integration with engine performance monitoring systems
- Audio System: Specialized audio debugging and profiling capabilities
Recent Changes
Build | Date | Component | Change Type | Description |
---|---|---|---|---|
676042 | 2025-06-21 | Console Tools | stable | Current console and hot-reload system |
676042 | 2025-06-21 | Debugging Tools | stable | Current debugging and diagnostic utilities |
676042 | 2025-06-21 | Profiling Tools | stable | Current performance analysis tools |
676042 | 2025-06-21 | Development Utilities | stable | Current development support utilities |
Development Tool Modules
Console Tools
Interactive command-line interface and hot-reload capabilities for rapid development iteration.
Module | Status | Description | Key Features |
---|---|---|---|
Console Commands | stable | Comprehensive command suite | 100+ commands, server admin, debugging |
Reload System | stable | Live code reloading system | Hot-swap, class patching, file monitoring |
Console Tool Categories:
- World Management: Save, reset, regenerate world functions
- Server Administration: Player management, announcements, voting systems
- Player Management: Health, stats, godmode, teleportation utilities
- Entity Operations: Spawn, give, find, remove entities
- Hot-Reload System: Live code updates without game restart
Debugging Tools
Comprehensive debugging and diagnostic utilities for identifying and resolving development issues.
Module | Status | Description | Key Features |
---|---|---|---|
Debug Commands | stable | Testing and scenario generation utilities | Entity spawning, world state, skill trees |
Debug Keys | stable | Interactive keyboard shortcuts | 50+ key bindings, modifier support |
Debug Helpers | stable | Entity and component inspection | Detailed dumps, upvalue analysis |
Debug Tools | stable | Core debugging infrastructure | Stack traces, table inspection |
Debug Print | stable | Enhanced logging and output | Source tracking, multiple loggers |
Stack Trace | stable | Error analysis and stack inspection | Safe conversion, local inspection |
Debug Menu | stable | Interactive menu framework | Options, navigation, submenus |
Debug Sounds | stable | Audio debugging and tracking | Sound interception, visual indicators |
Debugging Categories:
- Entity Analysis: Comprehensive entity and component inspection
- Interactive Debugging: Key bindings and menu systems for real-time debugging
- Error Analysis: Stack trace generation and error handling utilities
- Audio Debugging: Sound event tracking and visualization
- Code Analysis: Function inspection and upvalue analysis
Profiling Tools
Performance analysis and optimization utilities for maintaining high-quality code performance.
Module | Status | Description | Key Features |
---|---|---|---|
Profiler | stable | Lua performance profiling system | Time-based profiling, call analysis |
Mixer | stable | Audio mixing and profiling system | Volume management, filter analysis |
Profiling Categories:
- Performance Analysis: Lua code execution time measurement and bottleneck identification
- Audio Profiling: Audio system performance monitoring and optimization
- Memory Analysis: Memory usage tracking and leak detection
- System Optimization: Performance improvement guidance and validation
Development Utilities
Miscellaneous development support tools for workflow automation and code quality assurance.
Module | Status | Description | Key Features |
---|---|---|---|
Data Dumper | stable | Lua data structure serialization | Complex data dumping, circular references |
Strict Mode | stable | Global variable access control | Undeclared variable detection |
Known Errors | stable | User-friendly error reporting | Structured error messages |
Generic KV Store | stable | Key-value storage wrapper | Persistent settings, development data |
Character String Fixer | stable | Speech file organization tool | Content standardization |
Utility Categories:
- Data Serialization: Advanced data dumping and analysis capabilities
- Code Quality: Development-time code validation and enforcement
- Error Management: Structured error handling with user-friendly messaging
- Content Organization: Tools for content processing and standardization
Common Development Patterns
Comprehensive Development Setup
-- Enable complete development environment
DEVELOPMENT_MODE = true
CHEATS_ENABLED = true
PRINT_SOURCE = true
-- Console command workflow
c_save() -- Save current world state
c_announce("Development session") -- Notify players
c_godmode() -- Enable invincibility
c_spawn("wilson") -- Spawn entities for testing
-- Hot-reload workflow
ProbeReload(TheInput:IsKeyDown(KEY_F5)) -- Monitor for reload trigger
DoReload() -- Reload modified scripts
Advanced Debugging Session
-- Entity state analysis
local entity = c_sel() -- Select entity for debugging
DumpEntity(entity) -- Comprehensive entity analysis
DumpComponent(entity.components.health) -- Component inspection
-- Interactive debugging with keys
d_addemotekeys() -- Add emote debugging shortcuts
d_unlockaffinities() -- Unlock all skill trees
d_playeritems() -- Spawn all craftable items
-- Audio debugging
SOUNDDEBUGUI_ENABLED = true -- Enable visual sound indicators
Performance Analysis Workflow
-- Performance profiling setup
local profiler = newProfiler("time", 100000)
profiler:start()
-- Execute code to be analyzed
expensive_function()
game_update_loop()
-- Generate performance report
profiler:stop()
local report = profiler:report()
print(report)
-- Audio system profiling
local mixer = Mixer()
mixer:AddNewMix("performance_test", 1.0, 1, {
["set_music/soundtrack"] = 0.8,
["set_sfx/sfx"] = 1.0
})
Development Tool Dependencies
Required Systems
- System Core: Engine integration and console access
- Fundamentals: Entity system for command targets and debugging
- Data Management: Tool data persistence and configuration
Optional Systems
- User Interface: Debug UI overlays and visual indicators
- Networking: Remote command execution and multiplayer debugging
- Audio System: Sound debugging and profiling integration
Performance Considerations
Tool Impact
- Development tools minimize performance impact during normal gameplay
- Profiling tools use sampling to reduce measurement overhead
- Debug displays update only when actively viewed
- Console commands execute efficiently without blocking game updates
- Hot-reload systems preserve object references to minimize memory impact
Memory Usage
- Debug tools avoid memory leaks during extended development sessions
- Profiling data uses circular buffers to limit memory growth
- Tool state cleanup happens automatically when tools are disabled
- Visual debug indicators are cleaned up when debugging stops
Resource Management
- Tools respect system resources and don't interfere with game performance
- File operations from tools use async I/O when possible
- Debug output is rate-limited to prevent spam
- Audio profiling operates efficiently during real-time gameplay
Development Guidelines
Best Practices
- Always disable development tools in release builds
- Use descriptive names for console commands and debug functions
- Include help text for all custom commands and debugging utilities
- Clean up debug state when switching between development sessions
- Document debug key bindings and their purposes for team collaboration
Common Pitfalls
- Leaving debug tools enabled in production builds
- Creating debug commands that can crash the game or destabilize gameplay
- Not cleaning up profiling data after analysis sessions
- Implementing tools that significantly impact performance during measurement
- Creating overwhelming debug output without proper filtering mechanisms
Testing Strategies
- Test all debug commands with various parameter combinations and edge cases
- Verify profiling tools don't affect measured performance characteristics
- Test tool behavior with corrupted or invalid data inputs
- Ensure tools work correctly in both single-player and multiplayer environments
- Validate hot-reload functionality with complex inheritance hierarchies
Tool Integration Workflows
Development Workflow
- Initial Development: Use console commands for rapid iteration and testing
- Debugging Phase: Apply debug tools to identify and fix issues systematically
- Performance Optimization: Use profiling tools to find and resolve bottlenecks
- Quality Assurance: Validate changes with comprehensive debugging utilities
- Hot-Reload Integration: Maintain live development sessions without restarts
Debugging Workflow
- Issue Identification: Use debug overlays and commands to spot problems
- State Inspection: Apply debug helpers to examine system and entity state
- Root Cause Analysis: Use profiling and stack trace tools for deep analysis
- Solution Validation: Test fixes with debugging tools and performance monitoring
- Documentation: Record findings and solutions for future reference
Performance Workflow
- Baseline Measurement: Establish performance baselines with profiling tools
- Bottleneck Identification: Use profiling utilities to find performance hotspots
- Optimization Implementation: Apply optimizations guided by profiling data
- Validation: Confirm improvements with follow-up profiling analysis
- Regression Prevention: Monitor for performance regressions in ongoing development
Tool Security Considerations
Access Control
- Console commands require appropriate development mode privileges
- Debug tools are disabled in production builds automatically
- File system access is limited to safe development directories
- Network debugging tools respect security boundaries and don't expose sensitive data
Safe Usage Guidelines
- Never expose player data through debug tools or console commands
- Validate all inputs to debug commands before execution
- Limit file system access to development-only paths and operations
- Ensure tool commands cannot be exploited by players in multiplayer environments
Advanced Tool Features
Custom Tool Development
- Framework for creating custom debugging tools and utilities
- Integration patterns for new profiling metrics and analysis capabilities
- Guidelines for safe console command implementation and validation
- Best practices for debug visualization and user interface integration
Tool Extension Points
- Plugin system for custom debug commands and functionality
- Extensible profiling metric collection and analysis frameworks
- Customizable debug display options and visualization methods
- Integration hooks for external development tools and IDEs
Automation Integration
- Automated hot-reload monitoring and development workflow integration
- Continuous profiling and performance regression detection capabilities
- Automated debug report generation and analysis tools
- Integration with build systems for development tool configuration
Troubleshooting Development Tools
Common Tool Issues
Issue | Symptoms | Solution |
---|---|---|
Console not responding | Commands don't execute | Check console initialization and development mode |
Profiler data corruption | Invalid performance readings | Reset profiler state and verify configuration |
Debug overlays not showing | Visual debug elements missing | Verify debug mode enabled and UI flags |
Hot-reload failures | Modules not updating | Verify file paths, syntax, and inheritance chains |
Audio debug not tracking | Missing sound events | Enable SOUNDDEBUGUI_ENABLED flag |
Tool Debugging Process
- Check tool initialization and setup procedures
- Verify development mode is properly enabled for all tool categories
- Review tool-specific configuration settings and flags
- Test tools with minimal game state to isolate issues
Maintenance and Updates
Tool Maintenance
- Regular validation of tool functionality with new game builds
- Performance impact assessment for all development tools
- Documentation updates for new features and command additions
- Cleanup of deprecated debugging utilities and outdated analysis methods
Tool Evolution
- Addition of new debugging capabilities based on development team needs
- Performance improvements for frequently used development tools
- Enhanced integration with external development tools and modern IDEs
- Better user experience for complex debugging workflows and analysis tasks
Related Systems
- Core Systems: Integration points with all major game systems
- Fundamentals: Base entity and component systems for debugging
- System Core: Engine integration and performance monitoring
- User Interface: Debug UI overlays and visualization systems
Success Metrics
- Development Efficiency: Significant reduction in debugging and development iteration time
- Code Quality: Improved error detection and resolution through comprehensive tool usage
- Performance Optimization: Measurable performance improvements guided by profiling tools
- Team Productivity: Enhanced collaboration through shared debugging tools and procedures
Development tools provide the essential foundation for efficient DST development workflows through comprehensive debugging capabilities, performance analysis, and development automation.