Solved Debugging plugins [C#]

Discussion in 'Rust Development' started by Maniah, Jun 5, 2015.

  1. Hi,

    I'm new to Oxide (and mod development in general), and I'm wondering how you guys debug plugins.

    Right now I'm rebooting the server to test new code, but that's not practical.

    Any good hints or links on what's the best way to develop plugins?

    Thank you
     
  2. Wulf

    Wulf Community Admin

    Plugins are loaded/reloaded automatically with changes, so restarting your server is not needed.
     
  3. Tnx. I had an error, that's why it didn't reload.

    Any other tips to improve the development? Can I reference any projects to have code completion etc.?
     
  4. Wulf

    Wulf Community Admin

    You should be able to reference DLLs and use Visual Studio's IntelliSense.
     
  5. Thank you, adding all the references helped a lot!
     
  6. Read this I had pretty much the same questions:
    http://oxidemod.org/threads/issue-hot-reloading-plugin.9402/

    TLDR: Install Visual Studio 2015 and add references to the game DLL's (you can download the game using SteamCMD, google it) and Oxide DLL's (again you can download these from the site here).

    With all this done, you can compile the plugin locally and make sure it won't crash/hang your server. As a bonus you get code completion, resharper access and all those goodies ;)
     
  7. What I found is a good Debug method is hosting your own local rust server... And you can debug easily with no hang ups of plugins... I can reload 30 times in 30 seconds without issues. :)