Debugging OpenFX plugins - video-processing

I am creating a visual effects plug-in using OpenFX.
I have followed the programming guides from the official documentation.
However, I didn't find anything relating to debugging of OpenFX plugins.
I am looking for some specific methods for debugging my plug-in. I am currently using Natron / DaVinci Resolve as host applications.
Currently I have tried (I am running on Mac) to ``Attach to process'' via lldb or Xcode to e.g. DaVinci Resolve. Both results in an error or lost connection.

It depends on your IDE. With Visual Studio, for example, in your Solution used to build your plug-in you can set the "executable to run" as the host application. Then when you debug your plug-in, it will launch the host application under the debugger. Once the host has loaded your plug-in, your breakpoints become active (and new ones can be set) and will be hit when the host makes calls into your plug-in. You'll get source level debugging for your plug-in, but unless you have symbols the host items in the stack trace will just be hex.
Edit: I just noticed you said you're on a Mac. In Xcode, edit your Scheme. In Run/Debug you can set the Executable. As above, pick the host application. When you tell Xcode to "Run" your plug-in, it should launch the host.

Related

Unhandled exception in WWAHost in Cordova APP using Angular

I'm currently developing a windows modern app using Foundation for Apps and cordova. The app crashes in many ways during navigation, sometimes even immediately after running it.
The crash is this one
And i can't manage to debug it in any way.
I've tried setting up a window.onerror and a WinJS.Application.onerror catch all function with no results. Apparently the crash happens at a lower level. I've also inspected the event viewer but no info are available.
What happens is apparently similar to this question: How to debug unhandled win32 exception in WinJS Win8 store app which is unfortunately unsolved.
What are my options here?
I had the same issue with Visual Studio 2015, Windows 10 and cordova 5.1.1 when I transfer the project to another dev environment. It only occurs at the Windows-x64 app build configuration for the local machine.
After successful building, the app window launches shortly and after that, the win32 exception like the screenshot from sPoz came up. It was reproducible every time.
I try to repair Visual Studio and also I checked the environment variable from my solution as it is described in this Microsoft Article. But I had no luck.
Nothing helped, but simply open the config.xml file and change the Windows Target Version from "Windows 10" to "Windows 8.1" solved the problem and I could run the app with no error:
After that I can turn back to "Windows 10" and everything is fine. This was reproducable on two dev machines.
I do not exactly know if the moved project was the source of the problem and maybe the rewritten config.xml triggers any rebuild mechanism.
Most likely you are hitting an issue related to DOM Ex WWAHost.exe error on Windows 8.1 (apparently fixed on Win10). There is a workaround that should work for most apps; before you click around and get the WWAHost.exe exception, close the DOM Explorer window. This should enable you to debug by hitting breakpoints, etc. If you need to use DOM Ex against a Windows target, you might need try debugging against a remote device (see Kenneth's suggestion here: Why is Cordova Windows 8 app causing an unhandled win32 exception occurred in wwahost.exe?)
What are you using to develop the app ? The Visual Studio Tools for Apache Cordova ? Or Cordova with CLI ?
If you are using the plugin, you must launch the generated WP project to debug. The debug of WP app is not supported currently with the plugin.
I was getting same error during development of cordova windows tablet application, using Visual Studio Enterprise 2015. So far, I was doing try to close DOM-Explorer and use breakpoints and javascript console. After that, while searching javascript intellisense issues with Visual Studio, I figured out that my problem was fixed. What I did to get rid of this problem is that:
Open Tools > Options
Select Text Editor > Javascript > Intellisense > References
Add following references ( angular.intellisense.js, domWeb.js, domWindows_8.1.js ).
I don't know what are the correct reference files, but with these 3 reference files added, my problem has been solved.

Best gui for remote gdb [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know this question has been brought up before but it was mostly in respect to gdb for a program running on the local machine.
I've had some success with eclipse-cdt but it only seems to work occasionally. Supposedly Insight was previously used to debug (this embedded x86 board) but it seems to be dead.
I only need C debugging not C++. If possible I would prefer to connect through gdbserver (as that is on the advice and I connect to it through the command line all the time) but if you think putting gdb or ssh on the device and using it through those is better please mention those solutions also.
P.S. The version of gdbserver on the device is 7.1 it would be nice if the solution can work with a compatible version of gdb but I might be able to install a different gdbserver version.
I'd recommend eclipse Indigo it has built-in support for remote debugging applications via gdbserver. I just don't know where the source code has to be located for it to work.
Sinec it uses the MI interface of gdb it should work as any other interface that interacts with gdb.
I recommend trying out Qt Creator. It's cross-platform, has pretty good "code insight" features, and is a hell of a lot lighter-weight than Eclipse. It is a full IDE, not just a debugger front-end. It does require a gdb built with python support (client only, I think), but does come with it in its cross-platform installer. It is definitely more geared to developing C++/Qt applications, but does support generic Makefile and CMake projects, and I use it as my everyday C IDE and debugger.
Depending on exactly what kind of remote target you're debugging, the answer to this question could vary a lot. If you're cross-debugging to a deeply embedded microcontroller target running an RTOS, your options are going to be more limited.
For Makefile-based projects, you want to use the "Generic Project" creation wizard, which by default adds all the source files under the specified directory to your project. It may take some manual work to maintain your project, if you want Qt Creator to "understand" things that you've specified in your Makefile like command-line include directories (go in your .includes file), command-line included headers (go in your .config file), and command-line symbol definitions (go in your .config file). The project file list and compile, deploy, and run commands can all be maintained from the GUI though.
How about using DDD? I haven't used it much to be honest, and there seems to be a way to do remote debugging using DDD http://www.gnu.org/s/ddd/manual/html_mono/ddd.html#Remote%20Program
Gdb itself has already built-in curses based pseudo gui. By default, it splits main screen on 2 windows. Upper window contains source code, lower window is command line interface. Also there are other modes allowing to show you register values and assembly. It works well over ssh, so if you can, copy gdb on your device and debug it over ssh. If not, everything above can be applied for debugging over gdbserver.
You can use NetBeans. NetBeans support remote debugging with gdb. Gdbserver support plug-in also exist. I don't test plug-in but remote debugging using ssh working well.
Try Affinic Debugger GUI. It has newer design.
DDD is too old, Affinic Debugger supports all major platforms and is more powerful than DDD.

Is there a way to debug VC++ compiled applications using Eclipse/WinDbg?

I'm currently using Eclipse as my main editor, and source browser for our C/C++ project. The only problem is, I have to switch to Visual C++ everytime I have to debug or trace. Is there a way to have Eclipse use the WinDbg tool to debug Windows native applications? I tried searching on the web but all the forum posts seem to trail off to nowhere around 2007/2008.
I think the answer is no. Because you will not have access to the Win Debug Symbols and libraries within the Eclipse runtime. However you could start building this as an Eclipse plugin for VS users.

Silverlight application under IE attached to Windbg

Is it possible to attach Windbg to a Silverlight based application running under internet explorer ( or any other browser)? If its possible, then will I have to attach windbg to the browser and this will get me into that mini CLR under Internet explorer?
I am not an expert on Silverlight, but you can use WinDbg with Silverlight apps in the browser with some limitations. Also, since you stop the plug-in some browsers such as Chrome will constantly complain about the plug-in not responding.
The first thing you need to do is to make sure you load the correct version of SOS. Silverlight comes with its own version and that's the one you must use. To load the correct version use the CLR module to identify the associated version of SOS. The command is
.loadby sos coreclr
Notice the CLR module is called coreclr in Silverlight.
Use the .chain command to verify that you have the correct version of SOS loaded. If you already have a version of SOS loaded make sure to clear your WinDbg workspace first.
Following that you have access to the regular SOS commands. I've had limited success using some commands such as !clrstack and !dso, but others such as !threads and !dumpheap work as expected.
If you just attach, the !clrstack and !dso commands do not work as expected. However, if you set a breakpoint using !bpmd they will work in the context of the breakpoint. This is probably due to how code is run in a Silverlight app, but as I said I am no expert on Silverlight.
This applies to Silverlight 4.
Tess has a post about debugging Silverlight 2 apps in the browser.
This long post is also worth taking a look at.

Eclipse Plugin To Read Breakpoint Information

I'm working with a legacy embedded debugging tool and it's frustrating to work with. I just found out however that it can be automated in many ways, such at setting breakpoints on start up.
Since I use eclipse cdt as my development environment, I was wondering if I could write an eclipse plugin that reads all my breakpoints so I can generate a script in my debugging tools proprietary language and then launch the debugger. This way I can set breakpoints in eclipse and have them load up in my debugger when ever I need them.
Right-click in the breakpoint view and select "Export breakpoints..."

Resources