Skip to main content
Glama
buggy_script.py1.21 kB
""" Sample script for integration testing. This script has multiple breakpoint locations for testing the debugger's ability to pause and capture locals. """ def calculate_sum(numbers): """Calculate sum with multiple variables to inspect.""" total = 0 for num in numbers: total += num # Breakpoint location 1: line 13 return total def process_data(items): """Process items with intermediate steps.""" doubled = [x * 2 for x in items] # Breakpoint location 2: line 22 return doubled def main(): """Main function with test data.""" data = [1, 2, 3, 4, 5] result = calculate_sum(data) # Breakpoint location 3: line 28 print(f"Sum: {result}") # Process the data processed = process_data(data) # Breakpoint location 4: line 32 print(f"Processed: {processed}") # Additional calculations final_value = result * 2 # Breakpoint location 5: line 36 print(f"Final: {final_value}") # Test with dictionary config = {"mode": "debug", "level": 2} # Breakpoint location 6: line 40 print(f"Config: {config}") return final_value if __name__ == "__main__": exit_code = main() print(f"Exit code: {exit_code}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kaina3/Debug-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server