I can’t for the life of me get debugging to work in VS2017 with FL Studio. Here’s what I’m doing:
I’m setting a breakpoint in the constructor for AudioProcessorEditor
I’m selecting Attach to Process in the debug menu and attaching to FL.exe
I’m loading our plugin into FL Studio and opening the UI
Nothing happens. In the VS2017 UI I see “The breakpoint will not currently be hit. No symbols have been loaded for this document”
I’m linking in libcurl to my project, but I made sure that it’s linking the debug version of libcurl. My plugin is being built in debug mode, and is 32 bit. I’m making sure to use the 32 bit version of FL Studio as well. I’ve tried to “clean solution”, and It still can’t debug. Am I missing something?
Maybe you should not “attach” into the process while its already running. Try setting FL Studio as the debugging executable instead. (I don’t actually remember the “attach to process” would have ever been useful for me…)
Interesting, I didn’t know that was an option. I’ve always used attach to process when I’m on my mac, I figured I could do it on Windows. How do I set the debugging executable?
By the way, XCode also has the option to set an executable to run when debugging. (Using that is useful when you want to troubleshoot problems that happen right when the host starts, when it would be pretty difficult to run the IDE “attach to process” command.)
Something is definitely fishy here - In the Debug -> Windows -> Modules window, I found my DLL. It has the message “Binary was not built with debug information”, which annoys me because I’m building the debug configuration! Is the problem with the Projucer?
EDIT: Scratch that, it finally worked! I feel a bit silly, turns out FL Studio was always loading up the release build of my plugin instead of the debug build. There was no issue with VS or JUCE! Thanks Xenakios for the help
To prevent exactly that, in the post build phase we have a script that takes care of deleting any release build if we’re building debug, and vice versa.
I just overwrite the dll in the vstplugins folder with the latest build.
I do move the file instead of copying it. This ensures that the binary is rebuilt even when no change to the code has been made.