Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Wwise SDK, How to step through code using Visual Studio Debugger?

0 votes
I'm looking into making pugins using the Wwsie SDK, I have gotten a basic project set up and now I am looking at the examples provided with the SDK.

What I would like to do is step through the code using the debugger in visual studio, but I have no idea how I can set this up. If anyone can supply any info on how to accomplish this it would be greatly appreciated.
asked Oct 14, 2020 in General Discussion by Michael G. (110 points)

1 Answer

0 votes

There are two elements that you can debug: the Sound Engine plug-in (DSP part running in the game) and the Authoring plug-in (what runs in the Wwise Authoring application).
Since the Authoring plug-in also includes the Sound Engine part, I will explain how to set it up for the Authoring.

Setting the Right Configuration and Optimization Level


After you have run " premake Authoring", you should have the Visual Studio projects and solutions for Wwise Authoring. (refer to Using the Development Tools)
Open the solution ending in "_Authoring_Windows_vc1X0.sln" that corresponds to the Visual Studio studio version you want to use (vc140 = 2015, vc150 = 2017, vc160 = 2019).

Once in Visual Studio, select "Release" and "x64" as the target configuration. You cannot use the Debug target for Authoring as it expects to build against debug libraries, which you likely do not have access to.
Note how DebugExampleFX (the Sound Engine plug-in) has configuration "Profile" for Authoring: this is normal.

Because optimization can impact your capacity to debug, you can temporarily set the optimization level to /0d (disabled) while you develop for the Release configuration.
Simply Right-Click on the Visual Studio project you want to set, then "Properties" to access the Project Property Pages.
Under C/C++ > Optimization, set the Optimization Level to /0d (disabled).

If you build the Solution (Ctrl+Shift+B), the plug-in should be built inside the Wwise installation directory you used from (which should correspond to your WWISEROOT environment variable).
This will therefore put your plug-in under %WWISEROOT%/Authoring/x64/Release/bin/Plugins.

Attach to the running Process


To debug the plug-in when running inside Wwise Authoring, create a new project and add the plug-in somewhere, e.g., for an Effect add it in the Effects tab of a Sound SFX.
Then, set a breakpoint in Visual Studio in the Execute function of your plug-in (located in the <PluginName>FX.cpp file if you used the template).
Finally, select Debug > Attach to Process..., and find the Wwise.exe instance you want to debug. Once attached, play the Sound SFX and you should break inside Visual Studio!

To debug the Authoring part of the plug-in the process is exactly the same. You can also set the optimization level to /0d (disabled) for the Authoring project (the first in the solution explorer).

answered Jan 4 by Samuel L. (Audiokinetic) (1,980 points)
edited Jan 6 by Samuel L. (Audiokinetic)