Spaces:
Running
Running
"Create a comprehensive debugging and profiling tool built into the application with: performance monitoring, memory usage tracking, network request analysis, console with command history, variable inspection, and step-by-step execution control. Include export functionality for debugging sessions." - Initial Deployment
a2439c9 verified Download index.html from Darkxx91/devinsight-debugger: direct link, hf CLI and curl.
- Browser
- Download file 38.6 kB
-
https://huggingface.co/spaces/Darkxx91/devinsight-debugger/resolve/main/index.html
- Command line
-
hf download hf://spaces/Darkxx91/devinsight-debugger/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Darkxx91/devinsight-debugger/resolve/main/index.html
38.6 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>DevInsight - Advanced Debugging Tool</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| debug: { | |
| primary: '#4F46E5', | |
| secondary: '#6366F1', | |
| accent: '#8B5CF6', | |
| dark: '#1E293B', | |
| light: '#F1F5F9' | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| .graph-bar { | |
| transition: height 0.3s ease; | |
| } | |
| .console-log-item:hover { | |
| background-color: rgba(99, 102, 241, 0.1); | |
| } | |
| .network-row:hover { | |
| background-color: rgba(99, 102, 241, 0.05); | |
| } | |
| .memory-chart { | |
| transition: width 0.5s ease; | |
| } | |
| .tab-content { | |
| display: none; | |
| } | |
| .tab-content.active { | |
| display: block; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .resize-handle { | |
| transition: background-color 0.2s; | |
| } | |
| .resize-handle:hover { | |
| background-color: #6366F1; | |
| } | |
| .call-stack-item { | |
| transition: transform 0.2s; | |
| } | |
| .call-stack-item:hover { | |
| transform: translateX(5px); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-debug-light text-debug-dark font-sans"> | |
| <!-- Header --> | |
| <header class="bg-debug-dark text-white py-4 px-6 flex justify-between items-center"> | |
| <div class="flex items-center space-x-3"> | |
| <i class="fas fa-bug text-debug-secondary text-2xl"></i> | |
| <h1 class="text-xl font-bold">DevInsight Debugger</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button id="record-btn" class="bg-debug-primary hover:bg-debug-secondary px-4 py-2 rounded-md flex items-center"> | |
| <i class="fas fa-record-vinyl mr-2"></i> Start Recording | |
| </button> | |
| <button id="export-btn" class="border border-debug-secondary text-debug-secondary hover:bg-debug-secondary hover:text-white px-4 py-2 rounded-md flex items-center"> | |
| <i class="fas fa-file-export mr-2"></i> Export Session | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <div class="flex flex-col md:flex-row h-[calc(100vh-120px)]"> | |
| <!-- Left Panel - Controls --> | |
| <div class="w-full md:w-64 bg-white p-4 border-r border-gray-200"> | |
| <div class="mb-6"> | |
| <h2 class="font-semibold text-lg mb-3 text-debug-primary">Execution Control</h2> | |
| <div class="grid grid-cols-2 gap-2"> | |
| <button class="bg-debug-primary text-white py-2 rounded-md hover:bg-debug-secondary"> | |
| <i class="fas fa-play mr-1"></i> Start | |
| </button> | |
| <button class="bg-gray-200 py-2 rounded-md hover:bg-gray-300"> | |
| <i class="fas fa-pause mr-1"></i> Pause | |
| </button> | |
| <button class="bg-gray-200 py-2 rounded-md hover:bg-gray-300"> | |
| <i class="fas fa-step-forward mr-1"></i> Step Over | |
| </button> | |
| <button class="bg-gray-200 py-2 rounded-md hover:bg-gray-300"> | |
| <i class="fas fa-level-down-alt mr-1"></i> Step Into | |
| </button> | |
| <button class="bg-gray-200 py-2 rounded-md hover:bg-gray-300"> | |
| <i class="fas fa-level-up-alt mr-1"></i> Step Out | |
| </button> | |
| <button class="bg-red-500 text-white py-2 rounded-md hover:bg-red-600"> | |
| <i class="fas fa-stop mr-1"></i> Stop | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <h2 class="font-semibold text-lg mb-3 text-debug-primary">Breakpoints</h2> | |
| <div class="space-y-2"> | |
| <div class="flex items-center justify-between bg-gray-100 p-2 rounded"> | |
| <span>app.js:45</span> | |
| <button class="text-red-500 hover:text-red-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="flex items-center justify-between bg-gray-100 p-2 rounded"> | |
| <span>utils.js:12</span> | |
| <button class="text-red-500 hover:text-red-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <button class="w-full bg-debug-secondary text-white py-1 rounded-md hover:bg-debug-primary"> | |
| <i class="fas fa-plus mr-1"></i> Add Breakpoint | |
| </button> | |
| </div> | |
| </div> | |
| <div> | |
| <h2 class="font-semibold text-lg mb-3 text-debug-primary">Call Stack</h2> | |
| <div class="space-y-2 max-h-40 overflow-y-auto"> | |
| <div class="call-stack-item bg-gray-100 p-2 rounded text-sm"> | |
| <div class="font-mono">calculateTotal (cart.js:32)</div> | |
| <div class="text-xs text-gray-500">Local variables: 3</div> | |
| </div> | |
| <div class="call-stack-item bg-gray-100 p-2 rounded text-sm"> | |
| <div class="font-mono">updateCart (main.js:18)</div> | |
| <div class="text-xs text-gray-500">Local variables: 2</div> | |
| </div> | |
| <div class="call-stack-item bg-gray-100 p-2 rounded text-sm"> | |
| <div class="font-mono">onClick (button.js:7)</div> | |
| <div class="text-xs text-gray-500">Local variables: 1</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Debugging Area --> | |
| <div class="flex-1 flex flex-col"> | |
| <!-- Tab Navigation --> | |
| <div class="bg-white border-b border-gray-200"> | |
| <nav class="flex flex-wrap"> | |
| <button data-tab="performance" class="tab-btn active px-4 py-3 font-medium text-debug-primary border-b-2 border-debug-primary"> | |
| <i class="fas fa-tachometer-alt mr-2"></i> Performance | |
| </button> | |
| <button data-tab="memory" class="tab-btn px-4 py-3 font-medium text-gray-600 hover:text-debug-primary"> | |
| <i class="fas fa-memory mr-2"></i> Memory | |
| </button> | |
| <button data-tab="network" class="tab-btn px-4 py-3 font-medium text-gray-600 hover:text-debug-primary"> | |
| <i class="fas fa-network-wired mr-2"></i> Network | |
| </button> | |
| <button data-tab="console" class="tab-btn px-4 py-3 font-medium text-gray-600 hover:text-debug-primary"> | |
| <i class="fas fa-terminal mr-2"></i> Console | |
| </button> | |
| <button data-tab="variables" class="tab-btn px-4 py-3 font-medium text-gray-600 hover:text-debug-primary"> | |
| <i class="fas fa-code mr-2"></i> Variables | |
| </button> | |
| </nav> | |
| </div> | |
| <!-- Tab Content --> | |
| <div class="flex-1 overflow-auto"> | |
| <!-- Performance Tab --> | |
| <div id="performance" class="tab-content active p-6"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">CPU Usage</h3> | |
| <div class="h-40 flex items-end space-x-1" id="cpu-usage-graph"> | |
| <!-- Graph bars will be generated by JS --> | |
| </div> | |
| </div> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">Frame Rate</h3> | |
| <div class="flex items-center justify-center"> | |
| <div class="text-4xl font-bold text-debug-primary">60</div> | |
| <div class="ml-2 text-gray-500">FPS</div> | |
| </div> | |
| <div class="mt-4 h-24" id="fps-graph"> | |
| <!-- FPS graph will be generated by JS --> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">Function Timing</h3> | |
| <table class="w-full"> | |
| <thead> | |
| <tr class="bg-gray-100"> | |
| <th class="text-left p-2">Function</th> | |
| <th class="text-left p-2">Calls</th> | |
| <th class="text-left p-2">Total Time</th> | |
| <th class="text-left p-2">Avg. Time</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr class="border-b border-gray-200"> | |
| <td class="p-2 font-mono">renderComponent</td> | |
| <td class="p-2">142</td> | |
| <td class="p-2">1,240ms</td> | |
| <td class="p-2">8.7ms</td> | |
| </tr> | |
| <tr class="border-b border-gray-200"> | |
| <td class="p-2 font-mono">fetchData</td> | |
| <td class="p-2">24</td> | |
| <td class="p-2">980ms</td> | |
| <td class="p-2">40.8ms</td> | |
| </tr> | |
| <tr class="border-b border-gray-200"> | |
| <td class="p-2 font-mono">calculateLayout</td> | |
| <td class="p-2">18</td> | |
| <td class="p-2">420ms</td> | |
| <td class="p-2">23.3ms</td> | |
| </tr> | |
| <tr> | |
| <td class="p-2 font-mono">handleClick</td> | |
| <td class="p-2">56</td> | |
| <td class="p-2">320ms</td> | |
| <td class="p-2">5.7ms</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Memory Tab --> | |
| <div id="memory" class="tab-content p-6"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6"> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">Memory Usage</h3> | |
| <div class="flex items-center mb-4"> | |
| <div class="text-3xl font-bold text-debug-primary">84.2</div> | |
| <div class="ml-2 text-gray-500">MB / 256 MB</div> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-4"> | |
| <div class="memory-chart bg-debug-primary h-4 rounded-full" style="width: 33%"></div> | |
| </div> | |
| <div class="flex justify-between text-xs text-gray-500 mt-1"> | |
| <span>0 MB</span> | |
| <span>128 MB</span> | |
| <span>256 MB</span> | |
| </div> | |
| </div> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">Heap Allocation</h3> | |
| <div class="h-40 flex items-end space-x-1" id="heap-graph"> | |
| <!-- Graph bars will be generated by JS --> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-4 rounded-lg shadow"> | |
| <h3 class="font-semibold mb-3 text-debug-primary">Object Allocation</h3> | |
| <div class="grid grid-cols-2 md:grid-cols-4 gap-4"> | |
| <div class="bg-gray-100 p-3 rounded"> | |
| <div class="text-debug-primary font-bold">1,248</div> | |
| <div class="text-sm text-gray-600">DOM Nodes</div> | |
| </div> | |
| <div class="bg-gray-100 p-3 rounded"> | |
| <div class="text-debug-primary font-bold">4,812</div> | |
| <div class="text-sm text-gray-600">Event Listeners</div> | |
| </div> | |
| <div class="bg-gray-100 p-3 rounded"> | |
| <div class="text-debug-primary font-bold">12,482</div> | |
| <div class="text-sm text-gray-600">Objects</div> | |
| </div> | |
| <div class="bg-gray-100 p-3 rounded"> | |
| <div class="text-debug-primary font-bold">2,147</div> | |
| <div class="text-sm text-gray-600">Closures</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Network Tab --> | |
| <div id="network" class="tab-content p-6"> | |
| <div class="mb-4 flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <button class="bg-debug-primary text-white px-3 py-1 rounded mr-2"> | |
| <i class="fas fa-sync"></i> | |
| </button> | |
| <div class="relative"> | |
| <input type="text" placeholder="Filter requests..." class="border border-gray-300 rounded pl-8 pr-3 py-1"> | |
| <i class="fas fa-search absolute left-2 top-2 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="text-sm"> | |
| <span class="font-semibold">Requests:</span> 24 | |
| <span class="mx-2">|</span> | |
| <span class="font-semibold">Transferred:</span> 1.8 MB | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <table class="w-full"> | |
| <thead class="bg-gray-100"> | |
| <tr> | |
| <th class="text-left p-3">Method</th> | |
| <th class="text-left p-3">Status</th> | |
| <th class="text-left p-3">URL</th> | |
| <th class="text-left p-3">Size</th> | |
| <th class="text-left p-3">Time</th> | |
| <th class="text-left p-3">Timeline</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr class="network-row border-b border-gray-200 hover:bg-gray-50"> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">GET</span></td> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">200</span></td> | |
| <td class="p-3 font-mono text-sm">/api/products</td> | |
| <td class="p-3">42.8 KB</td> | |
| <td class="p-3">128 ms</td> | |
| <td class="p-3"> | |
| <div class="w-32 h-2 bg-gray-200 rounded-full overflow-hidden"> | |
| <div class="bg-debug-primary h-full" style="width: 80%"></div> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="network-row border-b border-gray-200 hover:bg-gray-50"> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">GET</span></td> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">200</span></td> | |
| <td class="p-3 font-mono text-sm">/static/css/main.css</td> | |
| <td class="p-3">18.2 KB</td> | |
| <td class="p-3">42 ms</td> | |
| <td class="p-3"> | |
| <div class="w-32 h-2 bg-gray-200 rounded-full overflow-hidden"> | |
| <div class="bg-debug-primary h-full" style="width: 30%"></div> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="network-row border-b border-gray-200 hover:bg-gray-50"> | |
| <td class="p-3"><span class="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">POST</span></td> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">201</span></td> | |
| <td class="p-3 font-mono text-sm">/api/cart</td> | |
| <td class="p-3">1.2 KB</td> | |
| <td class="p-3">86 ms</td> | |
| <td class="p-3"> | |
| <div class="w-32 h-2 bg-gray-200 rounded-full overflow-hidden"> | |
| <div class="bg-debug-primary h-full" style="width: 60%"></div> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="network-row border-b border-gray-200 hover:bg-gray-50"> | |
| <td class="p-3"><span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">GET</span></td> | |
| <td class="p-3"><span class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded text-xs">304</span></td> | |
| <td class="p-3 font-mono text-sm">/static/img/logo.png</td> | |
| <td class="p-3">0 B</td> | |
| <td class="p-3">12 ms</td> | |
| <td class="p-3"> | |
| <div class="w-32 h-2 bg-gray-200 rounded-full overflow-hidden"> | |
| <div class="bg-debug-primary h-full" style="width: 10%"></div> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="network-row hover:bg-gray-50"> | |
| <td class="p-3"><span class="bg-red-100 text-red-800 px-2 py-1 rounded text-xs">GET</span></td> | |
| <td class="p-3"><span class="bg-red-100 text-red-800 px-2 py-1 rounded text-xs">404</span></td> | |
| <td class="p-3 font-mono text-sm">/api/user/avatar</td> | |
| <td class="p-3">0 B</td> | |
| <td class="p-3">64 ms</td> | |
| <td class="p-3"> | |
| <div class="w-32 h-2 bg-gray-200 rounded-full overflow-hidden"> | |
| <div class="bg-red-500 h-full" style="width: 50%"></div> | |
| </div> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Console Tab --> | |
| <div id="console" class="tab-content flex flex-col h-full p-0"> | |
| <div class="flex-1 overflow-auto bg-gray-900 text-gray-200 p-4 font-mono text-sm" id="console-output"> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-blue-500"> | |
| <span class="text-blue-400">[LOG]</span> Application initialized | |
| </div> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-green-500"> | |
| <span class="text-green-400">[INFO]</span> Connected to API server | |
| </div> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-yellow-500"> | |
| <span class="text-yellow-400">[WARN]</span> Deprecated function used: oldFormat() | |
| </div> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-red-500"> | |
| <span class="text-red-400">[ERROR]</span> Failed to load resource: /api/config | |
| </div> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-blue-500"> | |
| <span class="text-blue-400">[LOG]</span> User session created: ID-2389 | |
| </div> | |
| <div class="console-log-item py-1 px-2"> | |
| <span class="text-purple-400">></span> let x = 10; | |
| </div> | |
| <div class="console-log-item py-1 px-2"> | |
| <span class="text-purple-400">></span> console.log(x * 2); | |
| </div> | |
| <div class="console-log-item py-1 px-2 border-l-2 border-blue-500"> | |
| 20 | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-700 bg-gray-800 p-2"> | |
| <div class="flex"> | |
| <div class="text-purple-400 mr-2 pt-1">></div> | |
| <input type="text" class="flex-1 bg-gray-800 text-white outline-none font-mono" placeholder="Enter debug command..." id="console-input"> | |
| <button class="ml-2 bg-debug-primary text-white px-3 py-1 rounded"> | |
| <i class="fas fa-arrow-right"></i> | |
| </button> | |
| </div> | |
| <div class="text-xs text-gray-500 mt-1"> | |
| <span class="mr-3">↑↓ History</span> | |
| <span>Ctrl+L Clear console</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Variables Tab --> | |
| <div id="variables" class="tab-content p-6"> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> | |
| <div class="bg-white rounded-lg shadow"> | |
| <div class="border-b border-gray-200 p-3 font-semibold text-debug-primary"> | |
| <i class="fas fa-globe-americas mr-2"></i>Global Variables | |
| </div> | |
| <div class="p-3"> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">window</div> | |
| <i class="fas fa-chevron-down text-gray-400"></i> | |
| </div> | |
| <div class="ml-4 mt-1 text-sm hidden"> | |
| <div>location: "https://app.example.com"</div> | |
| <div>innerWidth: 1280</div> | |
| </div> | |
| </div> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">document</div> | |
| <i class="fas fa-chevron-down text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">appConfig</div> | |
| <i class="fas fa-chevron-down text-gray-400"></i> | |
| </div> | |
| <div class="ml-4 mt-1 text-sm hidden"> | |
| <div>theme: "dark"</div> | |
| <div>version: "2.3.1"</div> | |
| <div>debugMode: true</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow"> | |
| <div class="border-b border-gray-200 p-3 font-semibold text-debug-primary"> | |
| <i class="fas fa-cube mr-2"></i>Local Variables | |
| </div> | |
| <div class="p-3"> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">currentUser</div> | |
| <i class="fas fa-chevron-down text-gray-400"></i> | |
| </div> | |
| <div class="ml-4 mt-1 text-sm hidden"> | |
| <div>id: "usr-2389"</div> | |
| <div>name: "Alex Johnson"</div> | |
| <div>email: "alex@example.com"</div> | |
| <div>role: "admin"</div> | |
| </div> | |
| </div> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">cart</div> | |
| <i class="fas fa-chevron-down text-gray-400"></i> | |
| </div> | |
| <div class="ml-4 mt-1 text-sm hidden"> | |
| <div>items: Array(3)</div> | |
| <div>total: 149.97</div> | |
| <div>currency: "USD"</div> | |
| </div> | |
| </div> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">isLoading</div> | |
| <div class="text-debug-primary font-mono">false</div> | |
| </div> | |
| </div> | |
| <div class="variable-item mb-2"> | |
| <div class="flex justify-between items-center cursor-pointer"> | |
| <div class="font-mono">apiEndpoint</div> | |
| <div class="text-debug-primary font-mono">"https://api.example.com/v2"</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6 bg-white rounded-lg shadow"> | |
| <div class="border-b border-gray-200 p-3 font-semibold text-debug-primary"> | |
| <i class="fas fa-binoculars mr-2"></i>Watch Expressions | |
| </div> | |
| <div class="p-3"> | |
| <div class="flex mb-2"> | |
| <input type="text" class="flex-1 border border-gray-300 rounded-l p-2 font-mono" value="cart.items.length"> | |
| <button class="bg-debug-primary text-white px-4 rounded-r"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <table class="w-full"> | |
| <tr class="border-b border-gray-200"> | |
| <td class="p-2 font-mono">cart.total > 100</td> | |
| <td class="p-2 text-green-500 font-mono">true</td> | |
| <td class="p-2 w-10"> | |
| <button class="text-red-500"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </td> | |
| </tr> | |
| <tr class="border-b border-gray-200"> | |
| <td class="p-2 font-mono">currentUser.role === 'admin'</td> | |
| <td class="p-2 text-green-500 font-mono">true</td> | |
| <td class="p-2 w-10"> | |
| <button class="text-red-500"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="p-2 font-mono">window.innerWidth</td> | |
| <td class="p-2 font-mono">1280</td> | |
| <td class="p-2 w-10"> | |
| <button class="text-red-500"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </td> | |
| </tr> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Tab switching functionality | |
| document.querySelectorAll('.tab-btn').forEach(button => { | |
| button.addEventListener('click', () => { | |
| // Remove active class from all buttons and content | |
| document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active', 'text-debug-primary', 'border-debug-primary')); | |
| document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.add('text-gray-600')); | |
| document.querySelectorAll('.tab-content').forEach(content => content.classList.remove('active')); | |
| // Add active class to clicked button | |
| button.classList.add('active', 'text-debug-primary', 'border-debug-primary'); | |
| button.classList.remove('text-gray-600'); | |
| // Show corresponding content | |
| const tabId = button.getAttribute('data-tab'); | |
| document.getElementById(tabId).classList.add('active'); | |
| }); | |
| }); | |
| // Generate CPU usage graph | |
| const cpuGraph = document.getElementById('cpu-usage-graph'); | |
| for (let i = 0; i < 40; i++) { | |
| const bar = document.createElement('div'); | |
| bar.className = 'graph-bar bg-debug-primary'; | |
| bar.style.height = `${Math.floor(Math.random() * 100) + 20}px`; | |
| bar.style.width = '8px'; | |
| bar.style.marginRight = '2px'; | |
| cpuGraph.appendChild(bar); | |
| } | |
| // Generate heap allocation graph | |
| const heapGraph = document.getElementById('heap-graph'); | |
| for (let i = 0; i < 30; i++) { | |
| const bar = document.createElement('div'); | |
| bar.className = 'graph-bar bg-debug-accent'; | |
| bar.style.height = `${Math.floor(Math.random() * 80) + 10}px`; | |
| bar.style.width = '10px'; | |
| bar.style.marginRight = '3px'; | |
| heapGraph.appendChild(bar); | |
| } | |
| // Console input handling | |
| const consoleInput = document.getElementById('console-input'); | |
| const consoleOutput = document.getElementById('console-output'); | |
| consoleInput.addEventListener('keypress', (e) => { | |
| if (e.key === 'Enter') { | |
| const command = consoleInput.value.trim(); | |
| if (command) { | |
| // Add command to console | |
| const commandElement = document.createElement('div'); | |
| commandElement.className = 'console-log-item py-1 px-2'; | |
| commandElement.innerHTML = `<span class="text-purple-400">></span> ${command}`; | |
| consoleOutput.appendChild(commandElement); | |
| // Clear input | |
| consoleInput.value = ''; | |
| // Scroll to bottom | |
| consoleOutput.scrollTop = consoleOutput.scrollHeight; | |
| } | |
| } | |
| }); | |
| // Variable inspection toggle | |
| document.querySelectorAll('.variable-item').forEach(item => { | |
| const header = item.querySelector('.flex'); | |
| const content = item.querySelector('.hidden'); | |
| if (content) { | |
| header.addEventListener('click', () => { | |
| content.classList.toggle('hidden'); | |
| const icon = header.querySelector('i'); | |
| icon.classList.toggle('fa-chevron-down'); | |
| icon.classList.toggle('fa-chevron-up'); | |
| }); | |
| } | |
| }); | |
| // Record button toggle | |
| const recordBtn = document.getElementById('record-btn'); | |
| recordBtn.addEventListener('click', () => { | |
| const isRecording = recordBtn.classList.contains('bg-debug-primary'); | |
| if (isRecording) { | |
| recordBtn.classList.remove('bg-debug-primary'); | |
| recordBtn.classList.add('bg-red-500'); | |
| recordBtn.innerHTML = '<i class="fas fa-stop mr-2"></i> Stop Recording'; | |
| } else { | |
| recordBtn.classList.add('bg-debug-primary'); | |
| recordBtn.classList.remove('bg-red-500'); | |
| recordBtn.innerHTML = '<i class="fas fa-record-vinyl mr-2"></i> Start Recording'; | |
| } | |
| }); | |
| // Export button functionality | |
| document.getElementById('export-btn').addEventListener('click', () => { | |
| alert('Debug session exported successfully!'); | |
| }); | |
| // Simulate performance data updates | |
| setInterval(() => { | |
| // Update CPU usage graph | |
| const bars = cpuGraph.querySelectorAll('.graph-bar'); | |
| bars.forEach(bar => { | |
| const currentHeight = parseInt(bar.style.height); | |
| const newHeight = Math.max(20, Math.min(120, currentHeight + (Math.random() * 40 - 20))); | |
| bar.style.height = `${newHeight}px`; | |
| }); | |
| // Update memory chart | |
| const memoryChart = document.querySelector('.memory-chart'); | |
| const currentWidth = parseInt(memoryChart.style.width); | |
| const newWidth = Math.max(10, Math.min(90, currentWidth + (Math.random() * 10 - 5))); | |
| memoryChart.style.width = `${newWidth}%`; | |
| // Update memory text | |
| const memoryText = document.querySelector('.text-3xl'); | |
| const currentMem = parseFloat(memoryText.textContent); | |
| const newMem = Math.max(50, Math.min(240, currentMem + (Math.random() * 4 - 2))); | |
| memoryText.textContent = newMem.toFixed(1); | |
| }, 2000); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Darkxx91/devinsight-debugger" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |