Skip to main content

VB: How to debug a console Visibroker application with MSVC

  • February 16, 2013
  • 0 replies
  • 1 view

Problem:

  • Product Name: VisiBroker for C
  • Product Version: 4.5
  • Product Component: Development, Microsoft Visual Studio 6
  • Platform/OS Version: Windows NT, 2000

How to debug a console Visibroker application with MSVC?

Resolution:

If you have a console program like, for example, the bank agent example in V:\\examples\\vbe\\basic\\bank_agent, you can use the MSVC 6 Integrated Developer Environment Windows program to debug.

Build like:
V:\\examples\\vbe\\basic\\bank_agent>nmake -f Makefile.cpp BUILD_TYPE=DEBUG

Start the Server.exe from the prompt,
V:\\examples\\vbe\\basic\\bank_agent>Server.exe

Start the windows Task Manager. Right Click at Server.exe. Choose "Debug". MSVC IDE should start up. You can ignore the warning: Debugging this process may result in loss of data. Are you sure you wish to attach the debugger.

Open the Server.C from the right directory. Now you can set a breakpoint with F9, and then restart using Debug, Stop Debugging. And then Build, Start Debug, Go.

Problems If you use other compilers it might be that you have to change something in the registry. First check with C:\\>regedit. The registry key "AeDebug" value must be: "C:\\Program Files\\Microsoft Visual Studio\\Common\\MSDev98\\Bin\\msdev.exe" -p %ld -e %ld. Including the quote characters. This entry will be overwritten for instance to BCB or Delphi if you install these programs, then the entry will be bordbg50.exe.

If you get a link error indicating you do not have the debug libraries you can do several things, the easiest and quickest way around this is copying the optimized files to files with the debug name, for example:
C:> copy orb_r.* orb_rd.*


#Security
#VisiBroker