4

I'm building an IDA Pro plugin (not a script) using the C++ SDK. On top of the frustration added by the lack of a proper API documentation, I cannot find a good way to debug my plugin.

I've tried printing messages to the output window of IDA Pro.

...
msg("Everything OK up to point 1\n");
...
msg("Everything OK up to point 2\n");
...

However, whenever my plugin hits an error state, IDA Pro crashes before I get a chance to read the messages that my plug-in printed in the output window.

While searching for a solution I stumbled upon the Wingware Python IDE which can be used to debug IDAPython. The drawbacks however are that it is not free and I am not developing the plugin in python.

One obvious thing to try is writing to a text file instead of writing to the IDA output window. However, that is not handy debugging. Isn't there a better way to debug an IDA Pro plugin built with C++ SDK?

  • 2
    This is hardly RE. You debug plugins as you would debug any other DLL. – Igor Skochinsky Sep 5 '14 at 10:36
  • I asked it here because: (1) RE has many IDA experts and questions, (2) i didn't know that .plx were equivalent to DLL or .so in my case – Benny Sep 5 '14 at 12:24
1

Most modern IDE's allow you to specify an executable to launch when debugging, you should specify your ida executable. Or otherwise, try to attach to the running IDA process.

When you put a breakpoint in the run() function of your plugin, your IDE will stop at run, and you can singlestep, etc from there.

Also you if you enable 'break on exception' your IDE will probably figure out if the exception was in your plugin, and load the right source file for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.