OpenFX Plugin Development/Debugging on Windows


#1

Hello,

i want to start develop my own OpenFX Plugin, but i am struggling with building my Development Enviroment and workflow.

  • currently i use Visual Studio 2017 with the Visual Studio 2015 (v140) Toolchain for compiling
  • Plugins are compiling correctly

But for easier development and bug finding i would like to use the VS Debugger
So i tried to attach natron-bin.exe and natron.exe to my debugger, but this didn’t work with resolve it worked this way

so wich setup and workflow would you recommend?

where can i find the console output made with

std:cout
printf()
OFX:log

thank you very much for your help

Manu


#2

answer from Frederic Devernay ( https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/natron-vfx/8gChX4p8E1c/ukMT7buMCgAJ)

If you launch natron from the command-line, you should see the messages there.
OFX::log() logs by default to a file names ofxTestLog.txt, which may be located next to natron.exe or in the plugins dir, I don’t remember. Look for that file.
I don’t have a windows machine, so I can’t help you more.
Natron is built with MSYS/MINGW, and I don’t know if the VS debugger can be attached to an MSYS/MINGW binary. Try google.

Anyway, this forum is not active anymore, and you should ask your questions on the new forum at https://discuss.pixls.us/c/software/natron

There is also a discussion on building Natron for windows there: Building Natron on Windows from scratch

Maybe Windows users will be able to help you


#3

@devernay

so would you recommend to move the general development of plugins to linux?


(Frédéric Devernay) #4

I do not recommend anything (I’m on macOS), but I just don’t have the recipe to debug on Windows. I hope someone can help and we can put it in the docs


#5

so how is you workflow on macOS for OFX Plugin Development?


(Frédéric Devernay) #6

On macOS, I’m using a debug-enabled Natron that I compilefrom sources (but it also works with a Natron release, or with Nuke).
Option 1:
Open the xcodeproj in the plugins sources (eg Misc.xcodeproj), select the “all” target in the topleft dropdown menu, then “Edit Scheme…” in this same menu, set the executable to the Natron executable, and put the breakpoints wherever you want in the plugin source.
Option 2:
Open the xcodeproj in the plugins sources (eg Misc.xcodeproj), launch the executable (Natron or Nuke), then in Xcode select “Debug/Attach to Process” and look for the Natron or Nuke executable.

Note that it doesn’t work in Resolve because they have some anti-debugging protection. I don’t know about Fusion.