How to debug teamspeak plugin?

Hey. How to debug teamspeak plugin? When Im trying to load plugin compiled in Debug mode I got error Plugin failed to load: Failed to open plugin.: [random_number] (minimum: 26, current: 26).

Im using this example (just changed Platform Toolset and #define PLUGIN_API_VERSION 26).

6/27/2023 03:00:13	Plugins	Info	Loading plugin: test_plugin.dll	
6/27/2023 03:00:13	Plugins	Info	Failed to load plugin: C:\Users\Mario\AppData\Roaming\TS3Client\plugins\test_plugin.dll	
6/27/2023 03:00:13	Plugins	Info	LoadLibrary error: 193

In Release mode Im unable to hit breakpoints (maybe somebody do have an solution for that).

I guess you are not compiling with the platform toolset v140xp. This way your plugin requires different C++ redistributables compared to the TeamSpeak client. This can work, but they need to be installed.

For some shameless self-promotion: I created my own template that is a bit more advanced than the official one. GitHub - Gamer92000/TeamSpeak3-Qt-Plugin-Template: A simple Qt plugin to demonstrate a full toolchain.


But the plugin compiled in Release mode is working fine.

That’s an interesting one. Generally, I found that this random number (uninitialized memory) occurs when the plugin is missing additional dependencies.
You could try checking it with Dependencies.
Other than that I have never actually debugged a plugin. You could try starting the TeamSpeak client inside the new WinDbg Preview from Microsoft. But with this “error”, I doubt it will be helpful.

Well, then, how to really debug issues in teamspeak plugin? You just can’t? Sounds weird.

Well the problem you have is most likely not with the code but how it is compiled. However both options I provided can be used to hopefully identify the problem. Once the plugin gets loaded correctly you can use WinDbg to its fullest potential to debug your plugin.