Closed ajhager closed 9 years ago
I haven't used jdb, I have always debugged through an IDE, so if that works, that is probably enough, but that is my opinion, jdb may be more common than I think. debug:iphoneSim
would be great and probably easiest, but I don't have deep enough understanding of sbt in these parts to be able to say for sure that it is possible. What is debug client mode and how is it different?
I am not sure how common using jdb is, but it is used in ensime for debugger support. I still need to test and make sure that works correctly with robovm, as well as test in IntelliJ.
RoboVM's debugger has a client mode where you can already have a debugger session started and have your debug app connect to that, in effect acting like the client instead of server. I was looking for a way to have execution stop at the start of the application so I can setup breakpoints in constructors. I think that will help with that.
It looks like with an InputTask, running any configuration in debug mode could be as simple as sbt iphoneSim debug 5678
with or without the port at the end. I'll try that out after work tonight.
Ah, that client mode is clever, I didn't know that is possible, I have always used "suspend=y" flag. That input task idea is good, but I think that doing it through debug:
configuration would be more SBT-like.
I'm looking into this and it looks like implementation of both ways will be the same, maybe a bit clearer with configuration, because there will be no parsing to do. I'll try to implement it.
Closed by c7d493a774b63fab4a654e64eeccf462a9a00ad7
The debugger seems to work great!
It would be nice if I could do something like
sbt hello/debug:iphoneSim
or somesuch to automatically setrobovmDebug
from the command line. It would also be handy to have a jdb task that uses robovmDebugPort and what it knows about the project's sources paths to runjdb -attach robovmDebugPort -sourcepath srcPath
, e.g.sbt hello/jdb
.I will also add a setting for robovmDebugClientMode.
I am still getting caught up on sbt, so I welcome any thoughts (cc @Darkyenus @pocorall ).