| | 51 | |
| | 52 | == Debugging (using Eclipse) == |
| | 53 | |
| | 54 | If you need to debug a plugin, it can easily be done using Eclipse: |
| | 55 | |
| | 56 | 1. Import your plugin as an existing project in Eclipse |
| | 57 | 2. Open your project properties to add required libraries (Properties -> Java Build Path -> Libraries -> Add External JARs). You must at least add `josm/core/dist/josm-custom.jar`, but you may also add your plugin dependencies if any (for instance `josm/dist/utilsplugin2.jar`). |
| | 58 | 3. Create a `Run Configuration` (Properties -> Run/Debug Settings -> New -> Java Application). Main class must be set to `org.openstreetmap.josm.gui.MainApplication`. |
| | 59 | 4. You can know tweak your plugin and/or set breakpoints… etc. |