ninja
ninja copied to clipboard
Implement mvn ninja:debug
The SuperDevMode is really useful in speeding up the development process. However the lack of "mvn ninja:debug" is a significant gap. The use of m2eclipse for debugging requires Eclipse, while mvn ninja:run doesn't. Also I personally don't use m2eclipse, because it could slow down Eclipse quite heavily for large projects. My expectation towards "mvn ninja:debug" is that it would start the embedded server in debug mode and would wait for a debugger to connect, printing the debugging port in the console. I realize that it might interfere with the SuperDevMode, because restarting the embedded server will disconnect the debugger and will require the user to reconnect it. However it would still be better than the current situation.
Two simple solutions:
- It is very convenient to debug testcases with a running server. Just set your breakpoint, use any IDE and hit "debug testcase".
- Debugging a running server is simple by using the jetty plugin (by default defined as plugin if you created your ninja project from one of our archetypes). More has been discussed here: https://groups.google.com/forum/#!topic/ninja-framework/MpMrBpaczjg
So at the end you got two simple and powerful solutions at hand to debug your applications. Hope that helps - and if you want to extend the ninja plugin let us know!
I could debug with IntelliJ.
I created a new main class:
public class Server {
public static void main(String[] args) {
NinjaJetty.main(args);
}
}
And changed the SSL port (in application.conf):
# ninja.ssl.port=8443
ninja.ssl.port=-1
It was necessary to avoid: Unable to create SSL context. Configuration key ninja.ssl.keystore.uri has empty value. Please check your configuration file.
Yuri, this is a workaround to still get your dev version of ssl with your main:
new NinjaJetty().ninjaMode(NinjaMode.dev).run();
On Tue, Mar 1, 2016 at 5:52 PM, Yuri Pourre [email protected] wrote:
I could debug with IntelliJ.
I created a new main class:
public class Server { public static void main(String[] args) { NinjaJetty.main(args); } }
And changed the SSL port (in application.conf):
ninja.ssl.port=8443
ninja.ssl.port=-1
It was necessary to avoid: Unable to create SSL context. Configuration key ninja.ssl.keystore.uri has empty value. Please check your configuration file.
— Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja/issues/202#issuecomment-190947510 .
Thank you, I couldn't find it. Works perfectly.