NetBeans, live debugging of a plugin...

Discussion in 'Plugin Development' started by hpdvs2, Aug 27, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    hpdvs2

    I have code with a large array of variables being passed through a lot of hoops. Debugging by stack trace is a huge pain. and logging that much information is a huge hassle. Is it possible to hook NetBeans Ide into the plugin as it runs? I'm a good programmer, but have little experience with NetBeans IDE.
     
  2. Offline

    keensta

    I don't think this is possible. I may be wrong. But I have never heard of anyone doing this,
     
  3. Offline

    Sagacious_Zed Bukkit Docs

    I know with eclipse it is possible to remote debug a java application. I am assuming the same thing can be done with Netbeans.
     
  4. Offline

    mossyblog

    If anyone is still lingering on this issue - it's possible if you use Craftbukkit as the "Main Project". Basically download Craftbukkit, get it working on it own first. Then make sure you setup a working directory that you can use an agreed "spot" for your plugins to then use.

    Then create your plugin project, and have it compile the JAR (maven etc ) into the Working directory of where your Craftbukkit debug runs (ie push it into your /yourlocation/plugins) directory.

    Then debug Craftbukkit while leaving your breakpoints into the Plugin source and it should hook into it as per normal IDE behavior.

    Now should you want to make adjustments or changes, inside Netbeans there is a "Apply Code Changes" option either in the tool bar (three green squares) or its buried under the "Debug" menu. Click that and that will inject the code changes into your current runtime (java hot swapping)... its pretty clumsy so your mileage will vary here in comparison to Eclipse...but i guess you have to weigh up the pro's and con's of Eclipse vs Netbeans - for me it came down to speed and neater IDE UI :) (I'm that shallow).
     
Thread Status:
Not open for further replies.

Share This Page