Using Wing with IDA Python

Index of All Documentation » How-Tos » Unmaintained How-Tos »


Wing Pro Screenshot

Wing Pro is a Python IDE that can be used to develop, test, and debug Python code written for Hex-Rays IDA multi-processor disassembler and debugger.

If you do not already have Wing Pro installed, download it now.

This document describes how to configure Wing for IDA. To get started using Wing as your Python IDE, please refer to the tutorial in Wing's Help menu or read the Quickstart Guide.

Note: This document is not maintained and was last tested in 2012.

Debugging IDA Python in Wing

IDA embeds a Python interpreter that can be used to write scripts for the system. In order to debug Python code that is run within IDA, you need to import a special module in your code, as follows:

import wingdbstub
wingdbstub.Ensure()

You will need to copy wingdbstub.py out of your Wing installation and may need to set WINGHOME inside wingdbstub.py to the location where Wing is installed. On macOS, this is the full path of Wing's .app folder.

Even though this is an embedded instance of Python, leave the kEmbedded flag set to 0.

Next click on the bug icon in the lower left of Wing's main window and make sure that Accept Debug Connections is checked. Then restart IDA and the debug connection will be made as soon as the above code is executed.

At that point, any breakpoints set in Python code will be reached and Wing can be used to inspect the runtime state, step through code, and try out new code interactively.

For more information on this configuration, see Debugging Externally Launched Code.

Related Documents

For more information see: