Visual Studio or Eclipse is not launched when encountering CBL_DEBUGBREAK from a Windows Service process

0 Likes
over 6 years ago

Problem:

When connecting to a remote machine using RDP (Remote Desktop Protocol) and launching a Windows Service which contains a CBL_DEBUGBREAK, Visual Cobol for Visual Studio or Visual Cobol for Eclipse does not detect the CBL_DEBUGBREAK.

Resolution:

When the service encounters the CBL_DEBUGBREAK, it has to interact with the desktop to display the 'Do you want to debug' prompt. It does this by getting the user currently logged into the computers console, and interacting with that console.

The remote desktop uses a separate session which is not the console window so the prompt is not visible.

This is a limitation of using RDP to access the remote machine and there are 2 alternatives to get the CBL_DEBUGBREAK to work:

For Visual Studio:

In the Visual Studio menu, go to Debug > Start Debugging.

This will then wait for you to run the Service and the application will attach as soon as it encounters the CBL_ DEBUGBREAK.

For Eclipse:

Start Eclipse as administrator and start a "COBOL Wait for Application Attachment" debug session.

When CBL_DEBUGBREAK or CBL_DEBUG_START is executed, Eclipse is launched and starts debugging the application.

 

Alternatively, using different remote desktop software such as RADMIN, which does not use a separate session, should get the correct behavior by just launching the Windows Service.

Comment List
Anonymous
Related Discussions
Recommended