|
| 1 | +--- |
| 2 | +title: Debugging Extensions in Phoenix Code |
| 3 | +--- |
| 4 | + |
| 5 | +The Debug menu provides several options for extension development. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Phoenix Code Developer Tools |
| 10 | + |
| 11 | +The `Phoenix Code Developer Tools` option (shortcut: F12) opens up the DevTools. Use this to inspect the DOM, preview logs and debug scripts. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## Phoenix Code Diagnostic Tools |
| 16 | + |
| 17 | +To open Phoenix Code Diagnostic tools, click on the `Debug` menu on the menu bar and navigate to the `Phoenix Code Diagnostic Tools` option. This section provides several tools for debugging purposes. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +### Available Diagnostic Tools |
| 22 | + |
| 23 | +1. `Run Phoenix Code Tests` |
| 24 | + Executes built-in tests to verify the functionality of Phoenix Code. |
| 25 | + |
| 26 | +2. `Build Editor Tests` |
| 27 | + Builds and runs tests specifically for the editor environment. |
| 28 | + |
| 29 | +3. `Enable Detailed Logs` |
| 30 | + Activates verbose logging for better insight into extension behavior. Use this to identify errors or unexpected behaviors during development. |
| 31 | + |
| 32 | +4. `Enable PhNode Inspector` |
| 33 | + Launches the PhNode inspector, allowing in-depth inspection of the extension runtime environment. |
| 34 | + |
| 35 | +5. `How to Inspect PhNode` |
| 36 | + Provides a guide to effectively use the PhNode Inspector. |
| 37 | + |
| 38 | + |
| 39 | +6. `Live Preview Logs` |
| 40 | + Displays real-time logs for active live previews, helping debug changes dynamically. |
| 41 | + |
| 42 | +7. `Show Performance Data` |
| 43 | + Generates performance metrics to identify bottlenecks or performance issues within the extension. |
| 44 | + |
| 45 | +8. `Open Virtual File System` |
| 46 | + Opens and inspects the virtual file system used by Phoenix Code. |
| 47 | + |
| 48 | +## FAQs |
| 49 | + |
| 50 | +Q. Why is console.log not displaying? |
| 51 | + |
| 52 | +- By default, console logs are disabled. To enable them, click on Enable Detailed Logs under Phoenix Code Diagnostic Tools. |
0 commit comments