Avatar of magdt
magdt
 asked on

How do I bring up the debugger when code executes?

I have a program that I wrote that works fine when it is run by itself.  I gave it out to a few people who added it to their scripts.  While it doesn't crash it does behave poorly from within scripts.  

What I would like to do is to put some type of statement inside my C program that would cause visual C++ debugger to be brought up so I can start debugging.

Is there such a statement?  I was told this is possible but I can't figure out how to do it.

Thanks,!
C

Avatar of undefined
Last Comment
magdt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
jkr

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jkr

BTW, to elaborate: 'int 3' causes the CPU to issue a 'breakpoint' interrupt, which fires up the debugger. The above function does nothing but invoke that statement.
magdt

ASKER
perfect, thanks for the help.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes