| 29 | |
| 30 | === VisualVM === |
| 31 | VisualVM may be used to find memory leaks or generate heap dumps from a josm instance running concurrently. Heap dumps can be structurally examined. VisualVM organizes them e.g. by number and type of objects, memory used and cpu time consumed in an explorable tree view. Heap dump and garbage collection of the target instance is requestable using button clicks. |
| 32 | * [http://visualvm.github.io VisualVM] |
| 33 | |
| 34 | If an autonomous instance of josm should be debuggable from within eclipse at the same time, command line parameters must be supplied to open a transport socket that the debugger can connect to: |
| 35 | {{{ |
| 36 | #!bash |
| 37 | # run JOSM with remote debug options; let VisualVM connect to 127.0.0.1 and port 9988; see the vm working |
| 38 | java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:9988,server=y,suspend=n -Xmx1200m -jar josm-latest.jar |
| 39 | }}} |
| 40 | |
| 41 | This is not necessary if the internals of JOSM are to be explored by VisualVM exclusively (tested with the yet to be released, but available, version 1.4). |
| 42 | |