Pelles C forum

C language => Beginner questions => Topic started by: AndruXo on September 18, 2009, 07:54:25 AM

Title: program tracing
Post by: AndruXo on September 18, 2009, 07:54:25 AM
Can anybody to explain how is it to trace my program in Pelles. I mean step by step,  like Builder C++ do it. Debugging (F5) it's not I need. There is some assembler code I don't know it.
Thanks.

PS. sorry for bad English )
Title: Re: program tracing
Post by: frankie on September 20, 2009, 07:00:40 AM
Have you read the help POIDE->DEBUGGING?
To high-level debug (source level) you have to include debugging info in the EXE.
Title: Re: program tracing
Post by: AndruXo on September 21, 2009, 09:06:04 AM
I've read the manual. There is some parameter "/p " for command POIDE that "specifies the IDE should start the debugger and attach to the running process identified by the pid". Are you meaning that?
So, it is necessary to build programm, then run it and execute something like that:
poide.com c:\pellesc\projects\picturedb /p 3386  ??? And what is next?
Explain what exactly to do, please.
Title: Re: program tracing
Post by: TimoVJL on September 21, 2009, 06:10:55 PM
First from help:

To be able to debug an executable it must contain debug information; see Compiler project options, Assembler project options, and Linker project options.

There is an add-in sample in the Add-In SDK, available from the download page, that helps you automate the task of switching between a debug build (with debug information), and a release build (without debug information).

So install Add-Ins if it isn't installed.
Select from menu Tools -> Customize
From Add-Ins tab  select Switch between debug build, release and profile build Add-In

Or from menu Project -> Project options...
Compiler tab: Debug information: full
Linker tab: Debug information: CodeView & COFF format

Then compile project.

Then use F9 function key to set breakpoint
Run program with F5 function key





Title: Re: program tracing
Post by: AndruXo on September 22, 2009, 01:24:18 PM
It is contained in help as you said. I am really blind. Thank timovjl, frankie for your patience ::).
Grateful so much.