Jump to content

Stepping into Paint.NET's code/detailed log?


Recommended Posts

Hello,

I'm in the process of updating a filetype plugin that uses a external library for some data decoding. In the old version the library was just a C# wrapper over a native DLL, but I'm trying to change it to a C++/CLI wrapper of the static version of the library and get rid of the extra dependency. The problem is that as soon as I try to open a sample file and Paint.NET starts loading the filetype DLL, it shows a "The file could not be found" error message box.

The GetFileTypeInstances() method and filetype constructor execute without a problem, but there's some code between that and OnLoad that can't be stepped into. So, is there any way to know what it's trying to load and why?

Cheers.

Link to comment
Share on other sites

In Visual Studio, go to the Debug menu -> Exceptions. In the dialog, make sure that the "Thrown" checkbox for "Common Language Runtime Exceptions" is checked. This may help...

But in general, no. You can't step through Paint.NET code. You can use Reflector to get a better view of it though. And actually I think they have a VS plugin that helps with debugging, so maybe that first sentence isn't accurate.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Thanks Rick, I always forget that dialog exists! The C++/CLI library was being compiled as x86 and the plugin crashed with a BadImageFormatException when trying to load it in a 64-bit system. It's fixed now!

Edited by r2d2rigo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...