Debug Plugin
This article will provide a detailed explanation of effective methods for debugging and troubleshooting Eagle plugins.
Last updated
This article will provide a detailed explanation of effective methods for debugging and troubleshooting Eagle plugins.
Last updated
After opening the plugin, press the F12 key to open the DevTools debugging tool.
The specific steps are as follows:
Open the plugin you want to debug in Eagle, and press the F12 key to open DevTools.
In DevTools, you can view the plugin's code and use breakpoints and debugging tools to debug the plugin's execution process.
You can also use other tools in DevTools to view information about the plugin's performance, memory usage, etc.
The thumbnail plugin runs in the background, and the code is only executed when files are added or updated. If you want to debug the thumbnail function code, you can set the devTools property to true in the manifest.json file and set debugger breakpoints in the code, which can then be debugged using devTools.
Add and select the file format you want to develop in Eagle, open the plugin panel, click on the plugin you're developing, and a separate preview window will open. You can press F12
to open DevTools
for debugging.
Learn more: If you are unsure 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 documentation: https://developer.mozilla.org/zh-CN/docs/Tools
W3Schools tutorial: https://www.w3schools.com/js/js_debugging.asp
Please note: The preview and thumbnail plugins currently do not support the log API.
A logging system is a tool used to record the running status of software, helping developers to locate and solve problems more quickly. The logging system records software error information, warning information, runtime information, etc., and can be used as a debugging tool. In a non-development environment, the logging system effectively helps developers identify the causes of problems and take measures to solve them.
Eagle Plugin API provides a log functionality to record plugin runtime information. This way, developers can record the plugin's running, warnings, errors, and other information in Eagle's software logs. By using this feature, developers can view this information by only providing a debug report to the user. While developing plugins, the logging feature helps developers to quickly locate and solve problems.
Learn More: Log - API Reference
Click here to view Eagle's software log acquisition method.