Created On: 9 August 2010
Problem:
A Visual COBOL 2010 solution contains two projects. The first project is a managed code COBOL project that calls the .DLL of the second project which is a native unmanaged COBOL project.
Can Visual COBOL 2010 be used to start debugging in the managed code program and then continue to debug in the called native code COBOL project?
Can Visual COBOL 2010 be used to start debugging in the managed code program and then continue to debug in the called native code COBOL project?
Resolution:
No. This type of mixed mode debugging is not currently supported in Visual COBOL 2010.
However, you can add a reference to the unmanaged project in the references folder of the managed code COBOL project and call the unmanaged program automatically through Platform Invoke but you cannot debug the unmanaged program.
Microsoft refers to this managed to native debugging as mixed-mode debugging.
There is an option available to “Enable mixed-mode debugging” in the Properties > Debug dialog. It only appears for managed projects and it is to allow mixed mode debugging for Microsoft languages (including managed languages so it includes managed COBOL). However, it only works with Microsoft native languages such as C or native C or Assembler.
For mixed mode debugging, you need one debugger for the managed section and another debugger for the unmanaged section. Then you need the two debuggers to be able to communicate with each other at a low level.
Since Microsoft owns both debuggers they can provide this support. Although Visual COBOL 2010 has support for debugging both managed code and native code independantly of one another, they cannot be used in the same application run.
However, you can add a reference to the unmanaged project in the references folder of the managed code COBOL project and call the unmanaged program automatically through Platform Invoke but you cannot debug the unmanaged program.
Microsoft refers to this managed to native debugging as mixed-mode debugging.
There is an option available to “Enable mixed-mode debugging” in the Properties > Debug dialog. It only appears for managed projects and it is to allow mixed mode debugging for Microsoft languages (including managed languages so it includes managed COBOL). However, it only works with Microsoft native languages such as C or native C or Assembler.
For mixed mode debugging, you need one debugger for the managed section and another debugger for the unmanaged section. Then you need the two debuggers to be able to communicate with each other at a low level.
Since Microsoft owns both debuggers they can provide this support. Although Visual COBOL 2010 has support for debugging both managed code and native code independantly of one another, they cannot be used in the same application run.
Incident #2468749
Old KB# 31578
#managecode
#nativecode
#debug
#VisualCOBOL