When you need to debug Eagle plugins, you can use different debugging methods based on the plugin type. This article will introduce debugging methods for window plugins, thumbnail plugins, and preview plugins.
Window Plugin Debugging
- Open the plugin you want to debug in Eagle
- Press
F12to open DevTools - In DevTools, you can:
- View plugin code
- Set breakpoints
- Use debugging tools to trace the plugin's execution process
- Analyze the plugin's performance and memory usage
Thumbnail Plugin Debugging
Thumbnail plugins run in the background, and their code only executes when files are added or updated. To debug thumbnail plugins:
- In the
manifest.jsonfile, set thedevToolsproperty totrue - Set
debuggerbreakpoints in your code - Use DevTools for debugging work
Preview Plugin Debugging
- Add the file format you want to develop to Eagle and select it
- Open the plugin panel and click on the preview plugin you're developing
- This will open an independent preview window
- Press
F12to open DevTools for debugging
Learning DevTools
If you're not familiar with how to use DevTools, you can refer to the following learning resources:
- Google Official Documentation: https://developers.google.com/web/tools/chrome-devtools
- MDN Web Docs: https://firefox-source-docs.mozilla.org/devtools-user/index.html
- W3Schools Tutorial: https://www.w3schools.com/js/js_debugging.asp