# Debugging juce\_vst3\_helper.exe and post-build script failures with MSBuild

**URL:** <https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462>\
**Category:** Windows\
**Created:** [June 26, 2025, 6:20pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462 "2025-06-26T18:20:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimc](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jimc/32/16067_2.png) [@jimc](https://forum.juce.com/u/jimc)\
**Post date:** [June 26, 2025, 6:20pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/1 "2025-06-26T18:20:03Z")

</div>

There is nothing in my programming life that is more unpleasant than the post-build script error. We have to put several additional steps in it to allow the vst3\_helper.exe tool to run, and it’s impossible to tell which step fails and very hard to test them. So if anyone comes up with a better way of creating the moduleinfo.json, maybe directly from the CMakeLists.txt I’d give them a snog.

Another fun thing about the build script: MSBuild parses the script for the word ‘error’ or something similar and if it gets it from any tool, even if the exit code is 0, it marks it as failed with a result code of -1.

That said. Having spent TWO DAYS working on a post build script error that only occurs when running from our builds cript and doesn’t happen in the IDE, and only happens when running on the build server not on my bloody desktop I’ve found a handy tip.

- Tip 1: Wrap every command you call from the post build script in another script which prints out when the step is starting, and ending. Then you can tell what failed. ChatGPT/Claude will write you a brilliant script …

- Tip 2: Redirect everything from tools to a file and print it out only if the tool fails. Then you don’t get spurious triggers if something prints the word ‘error’ but it’s not. Our string obfuscator happened to print that out one day. Or maybe you’ll find yourself in a path with with word error in and it’ll suddenly start failing randomly.

- Tip 3: Install procdump ([ProcDump - Sysinternals | Microsoft Learn](https://learn.microsoft.com/en-us/sysinternals/downloads/procdump)) and then run it with the -i flag. Then when/if VST3 helper.exe crashes you’ll get a DMP file in AppData/Local/CrashDumps and you can just double click on it to debug in VS2022.

It would be good if the VST3 helper could be improved to have a crash handler and write it’s own minidump files, and also print out when it starting and ending. It’d only be a few lines of code. I’d add it but I can’t fihd where the fucking main function is in it, looks like it’s some strange wrapper around some Steinberg code?

Right. Rant over. Leaving these notes here so next year when i have the same problem I can remember how to fix it!

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [June 26, 2025, 8:42pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/2 "2025-06-26T20:42:01Z")

</div>

Sorry to hear you’ve been having problems with the vst3 helper. Are you using the latest version on develop? We’ve long been thinking and internally discussing better ways to handle the moduleinfo.json generation. Recently we changed the helper so it no longer loads the plugin at all (see [this](https://github.com/juce-framework/JUCE-dev/commit/f3d7c74ea1ce9df539754dd3a5d09c4f8b40c1a1) commit). This should hopefully mean the chance of a crash in the helper is now very low 🤞 The only user code that should appear in the helper is now defined via a preprocessor definition.

---

<div class="post-metadata">

**Author:** ![jimc](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jimc/32/16067_2.png) [@jimc](https://forum.juce.com/u/jimc)\
**Post date:** [June 26, 2025, 9:14pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/3 "2025-06-26T21:14:25Z")

</div>

Ah - well I look forward to upgrading at some point. We’re still on JUCE 7 at the mo!

Not loading the plugin at all is a perfect fix. 🙂 Very pleased you’ve done that. We had to jump through quite a lot of hoops to get it working with the current load the plugin system.

Although … now i’ve tracked down we actually do have a bug somewhere to fix, one that only shows up in release builds in very particular circumstances … so this is gonna be fun.

Thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![nbacklund](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbacklund/32/2969_2.png) [@nbacklund](https://forum.juce.com/u/nbacklund)\
**Post date:** [June 30, 2025, 3:08pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/4 "2025-06-30T15:08:56Z")

</div>

I’m experiencing somewhat similar problems, having just migrated an existing project to CMake. I’ve gotten it to work on Mac now, but on Windows (VS 2022) I’m getting:

```
'juce_vst3_helper' is not recognized as an internal or external command, ...'

```

I’m doing an “out of source build”, i e the build path is ../build-windows relative the project. I don’t know if that is something that could cause issues?

juce\_vst3\_helper.exe does exist in ../build-windows/Debug/, I don’t know why JUCE doesn’t find it there since it was probably put there by JUCE’s build?

I tried adding it to the path in CmakeLists.txt just in case:

```
if (WIN32)
    set(juce_vst3_helper_path "${CMAKE_BINARY_DIR}/Debug")
    set(ENV{PATH} "$ENV{PATH};${juce_vst3_helper_path}")
endif()

```

but it doesn’t seem to make any difference.

---

<div class="post-metadata">

**Author:** ![jimc](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jimc/32/16067_2.png) [@jimc](https://forum.juce.com/u/jimc)\
**Post date:** [July 1, 2025, 10:50am UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/5 "2025-07-01T10:50:26Z")

</div>

Add a command to the post build script to print the current workign directory and the path to juce\_vst3\_helper it’s using (if hta’ts not already displayed on the console)? Check the path is valid from the directory it’s calling the script from.

I don’t think adding it ot the PATH is a good solution.

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [July 1, 2025, 10:56am UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/6 "2025-07-01T10:56:13Z")

</div>

What version of JUCE are you using and are you on the develop branch?

---

<div class="post-metadata">

**Author:** ![nbacklund](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbacklund/32/2969_2.png) [@nbacklund](https://forum.juce.com/u/nbacklund)\
**Post date:** [July 2, 2025, 12:47pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/7 "2025-07-02T12:47:16Z")

</div>

Yeah, you’re right, that’s not a good solution. Instead I added a step that copied the juce\_vst3\_helper from Debug up to the build root, and that solved the problem.

But later I ran into other issues with the Visual Studio generator, so I switched to Ninja, and now it seems that the helper ends up in the build root from the beginning? I don’t know if it was because of that or that some other misconfiguration I’ve made before got deleted. I was changing around a lot of stuff at the same time.

But anyway, it all seems to be working at the moment!

I’m still on JUCE 8.0.7, I’m too much of a chicken to use the develop branch in production, and I try to only update JUCE when everything else in my project is stable. 🙂

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [July 2, 2025, 3:00pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/8 "2025-07-02T15:00:49Z")

</div>

Glad to hear it’s working. I only wanted to know if you were on develop as there were some significant changes to the VST3 helper recently so I was conscious those changes could have been the cause of the issues you were seeing. It’s sounds like that’s probably not the case.

---

<div class="post-metadata">

**Author:** ![nbacklund](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nbacklund/32/2969_2.png) [@nbacklund](https://forum.juce.com/u/nbacklund)\
**Post date:** [July 2, 2025, 7:54pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/9 "2025-07-02T19:54:07Z")

</div>

Ah, OK, thank you!

Are you referring to the change where the VST3 helper will no longer have to load an instance of the plugin?

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [July 2, 2025, 7:57pm UTC](https://forum.juce.com/t/debugging-juce-vst3-helper-exe-and-post-build-script-failures-with-msbuild/66462/10 "2025-07-02T19:57:58Z")

</div>

> [@nbacklund](#):
>
> Are you referring to the change where the VST3 helper will no longer have to load an instance of the plugin?

I am, this did bring around some changes to CMake too though. In the previous version as it was just a tool that could in theory load any plugin it was only built once if you had a project building multiple plugins, but now it’s built for each plugin as it’s always unique to the specific plugin.
