debugging CGI program

I have a C++ program that will be put in the directory cgi-bin.  How can I debug the program in VC++?  Thanks

LVL 1
tao_shaobinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chensuCommented:
HOWTO: Debug CGI Using Visual C++ Just-In-Time Debugger
http://support.microsoft.com/support/kb/articles/q239/5/35.asp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tao_shaobinAuthor Commented:
Hi, Chensu:

I tried the function DebugBreak() and its header file

#include <winbase.h>

Then, the compiler give me some errors as below:

d:\vc98\include\winbase.h(216) : error C2146: syntax error : missing ';' before identifier 'Internal'
d:\vc98\include\winbase.h(216) : error C2501: 'DWORD' : missing storage-class or type specifiers
d:\vc98\include\winbase.h(216) : error C2501: 'Internal' : missing storage-class or type specifiers

why?
0
chensuCommented:
#include <windows.h>

instead of

#include <winbase.h>
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

tao_shaobinAuthor Commented:
Hi, Why should I use <windows.h> instead of <winbase.h> since my online help give me:

QuickInfo
  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.

0
chensuCommented:
Yes, DebugBreak is declared in the winbase.h. However, winbase.h requires other header files to be included first. Windows.h does this and it includes winbase.h. You should include windows.h for most basic Win32 API functions.
0
chensuCommented:
The documentation is somewhat confusing though.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.