Search code examples
visual-studiovisual-studio-2015vb6

How to debug VB 6 binaries in Visual Studio 2015


I used to debug VB 6 binaries using VS 2005 few years back. Now I am trying to do the same in VS 2015 but I am not able to. Could anyone please tell me step by step how can I debug VB 6 binaries in VS 2015?


Solution

  • In your VB6 project's Project->Properties->Compile, check "Compile to Native Code," "No Optimization" and "Create Symbolic Debug Info."

    enter image description here

    In Visual Studio 2015's Debug->Options, check "Use Native Compatibility Mode": enter image description here

    At runtime, in VS2015, attach to the process containing your VB6 executable. At this point, you should be able to set breakpoints and step through the code.