1. I frequently find myself adding a bunch of debug messages to my plugin in order to find out exactly which line caused an error, which is a pain and it becomes even more difficult when I need to reload the plugin to add those debug messages and then I can't reproduce the error because reloading the plugin can temporarily fix the issue until some code in the plugin is executed that causes it to break again. I have been looking into ways to produce lines numbers when errors are thrown to console the only thing I have found is people telling their IDE to create pdb file when the dll is compiled, but for oxide I do not have to compile my own code and if I try to use a dll oxide won't load it afaik. I have tried adding a pdb file to the plugin directory, but I don't think that will work because the compiled code may be a bit different, rendering the pdb file useless. Even if the pdb file was correct for the compiled version that oxide creates I don't think that oxide looks for the pdb file and attempts to use it.

    My ultimate goal is to be able to see the line numbers of different calls in the stack trace of an error.
     
  2. Wulf

    Wulf Community Admin

    If you'd like more detailed debugging, you can build a debug build of Oxide which will include .mdb files.
     
  3. I cloned the Oxide.Rust repository and successfully got it to build the develop branch, but I realized that you said a debug build of Oxide. Is there an option I need to add when building the solution or how do I go about building a debug version of oxide?
     
  4. Wulf

    Wulf Community Admin

    Change to "Debug" config in Visual Studio.