Debug Plugin DLLs in Visual Studio – ShiVa Engine

Debug Plugin DLLs in Visual Studio

Debugging native C++ code in ShiVa plugins can be a difficult task if you rely exclusively on ShiVa error messages and logging. Coupling ShiVa and the Visual Studio Debugger is much more effective.
To check the state of your DLL code at a certain point, you will need to halt the execution. This is called a breakpoint. Setting one in Visual Studio will add a red bubble to a line of code:
Now you need to compile your plugin. Choose win32 or x64 depending on the bitness of your ShiVa Editor (most likely 64bit) as well as the DEBUG profile.
Next, you need to attach the Visual Studio Debugger to the ShiVa Editor process. Go to the Debug menu and choose “Attach to Process…”.
A new dialogue will open. Select the ShiVa Editor process from the list and press Attach.
Visual Studio and ShiVa are now linked. Every time a breakpoint is reached, Visual Studio will halt the execution of your ShiVa game and display the state of your variables, processor, memory etc. inside the debugger.
The controls for the debugger are located near the top menu. Stepping in/out/over, stop and continue behave as you would expect from any other debugger.

Need more answers?

  • slackBanner