Patch to run emulator in debug mode

14 views
Skip to first unread message

Ignacio Galmarino

unread,
Jan 3, 2011, 2:39:52 PM1/3/11
to pyx4me-users
This is a little patch to let you run the emulator in debug mode.

Use:

mvn j2me:run -Dj2me.debugAddress=8000

because a restriction in antenna only the local port can be assined

------------------------------------------------------- patch begin
-------------------------------------------------------

Index: src/main/java/com/pyx4me/maven/j2me/WtkRunMojo.java
===================================================================
--- src/main/java/com/pyx4me/maven/j2me/WtkRunMojo.java (revision
7756)
+++ src/main/java/com/pyx4me/maven/j2me/WtkRunMojo.java (working copy)
@@ -53,6 +53,14 @@
* @parameter expression="${j2me.heapsize}"
*/
protected String heapsize;
+
+ /**
+ * The address to start the debugger on
+ *
+ * @parameter expression="${j2me.debugAddress}"
+ */
+ protected String debugAddress;
+

public void execute() throws MojoExecutionException,
MojoFailureException {
executeRun(this, classifier, false, device);
@@ -78,6 +86,10 @@
task.setHeapsize(heapsize);
}

+ if (debugAddress != null) {
+ task.setDebugAddress(debugAddress);
+ }
+
task.setDevice(device);
setFileValue(task, "setJadFile",
mojo.getJadFile(packageClassifier));
return task;

------------------------------------------------------- patch end
-------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages