Sandeep
Sandeep

Reputation: 69

Debuggin C program using microsoft visual c++ 2008

How do i apply break point for a c program in microsoft visual c++ editor? I tired this - 1)apply break point for a particular line in my code 2)open visual studio command prompt. 3)compiled my program using cl program.c 4)program.exe

Is this the right procedure to follow?

Upvotes: 0

Views: 158

Answers (1)

Steve Townsend
Steve Townsend

Reputation: 54178

For break points to fire, you have to run the program inside the IDE (Visual C++ editor in your case) wherein you set them, usually using F5.

If you run from a command prompt there is no debugger attached to the process so nothing can detect the breakpoint being hit. You can also attach a debugger to a running process and set breakpoints to fire post facto.

Upvotes: 2

Related Questions