NO

Author Topic: how to debugg in pelles c  (Read 12321 times)

joybanerjee39

  • Guest
how to debugg in pelles c
« on: December 24, 2011, 05:48:50 PM »
i want to know the procedure to debugg using pelles c  version 6.00.4.
any tutorial or anything would be helpfull!
thanks!

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: how to debugg in pelles c
« Reply #1 on: December 24, 2011, 06:08:06 PM »
i want to know the procedure to debugg using pelles c  version 6.00.4.
any tutorial or anything would be helpfull!
thanks!
Well, not sure what your problem is figuring this out, but for a start, make sure you have "Debug information" in the project options set to "Full" (for "Compiler" and "Assembler" as needed) before gently hitting the "Go/Debug" button.

Beside that, check out the "Debugger: Introduction" and "Projects: Debugging projects" as well as related sections in the help file...

Ralf

PS: And upgrading to the latest 6.50 would probably be helpful too...

CommonTater

  • Guest
Re: how to debugg in pelles c
« Reply #2 on: December 24, 2011, 09:34:20 PM »
i want to know the procedure to debugg using pelles c  version 6.00.4.
any tutorial or anything would be helpfull!
thanks!

What Ralf said....

Plus...
First make sure you are seeing line numbers and matching braces:
Click...
Source -> View Line Numbers = Checked
Source -> View Brace Matching = Checked
These are helpful all the time.

Now to setup for debugging...
Click .. Project -> Project Options -> Compiler -> Debug Information = Full.
for 32 bit projects...
Also Click ... Project  -> Project Options -> Linker -> Debug Information = Codeview and COFF
for 64 bit projects...
Also Click ... Project  -> Project Options -> Linker -> Debug Information = Codeview

Now when you click the "go debug" button you should see source code level debugging begin after the project rebuilds itself.

And please do take Ralf's advice to spend some time in the help file... it's very complete.

boral

  • Guest
Re: how to debugg in pelles c
« Reply #3 on: December 25, 2011, 08:46:14 AM »
you asked for tutorial.Download this ebook 'C How to Program' 6th edition from
http://oron.com/emja6ov8noxb

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: how to debugg in pelles c
« Reply #4 on: December 25, 2011, 07:20:18 PM »
you asked for tutorial.Download this ebook 'C How to Program' 6th edition from
http://oron.com/emja6ov8noxb
That won't help too much with his question on "how to debug in Pelle's C". But a s mentioned, most of that information he might need is simple in the help file...

Ralf

CommonTater

  • Guest
Re: how to debugg in pelles c
« Reply #5 on: December 25, 2011, 07:36:16 PM »
That won't help too much with his question on "how to debug in Pelle's C". But a s mentioned, most of that information he might need is simple in the help file...
Ralf

Hi Ralf... Best on the day!

It certainly won't help him much and there's a copyright issue as well.

I really don't understand people's resistence to using menus or reading help files, but I see it all the time. "Click on File in the main menu, please"... big glaring hesitation... Like, what is that?

Debugging with Pelles isn't difficult... The first time I did it, I just messed with the settings till I got it to work... A few clicks in menus and dialogs and I learned a lot about POIDE that day...  Afterwards I read the help file and understood more... 

If you're not willing to explore and learn, especially about software you need to use to explore and learn... might as well take up knitting :D

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: how to debugg in pelles c
« Reply #6 on: December 25, 2011, 08:45:26 PM »
That won't help too much with his question on "how to debug in Pelle's C". But a s mentioned, most of that information he might need is simple in the help file...
Ralf

Hi Ralf... Best on the day!
Thanks, same to you!  ;)
Quote
It certainly won't help him much and there's a copyright issue as well.
I didn't even try to look up the link he posted, it was just obvious that a general C tutorial won't help with a compiler/IDE specific question...
Quote
I really don't understand people's resistence to using menus or reading help files, but I see it all the time. "Click on File in the main menu, please"... big glaring hesitation... Like, what is that?
Laziness?
Quote
Debugging with Pelles isn't difficult... The first time I did it, I just messed with the settings till I got it to work... A few clicks in menus and dialogs and I learned a lot about POIDE that day...  Afterwards I read the help file and understood more... 
Same here, I just forgot in the original reply to mention the setting for the linker.
Quote
If you're not willing to explore and learn, especially about software you need to use to explore and learn... might as well take up knitting :D
That's manual labor, that's even worse...  ::)

As for programming, as I mentioned before here in the forum, there are three level/steps/hurdles for people new to all this:

1) learning to program (understanding general programing logic and methods, which is independent from any program language/environment)
2) learning to program in a specific programming language (which is much harder if someone skipped on step one)
3) learning to program in a specific OS/programing environment.

Too many people these days are trying to "take the quick route" and directly jump into the deep end of the pool (step 3), only to realize (or not  :o ) that they will drown pretty quickly if they don't have the basics of step 1 and 2 down...  :(

Ralf

CommonTater

  • Guest
Re: how to debugg in pelles c
« Reply #7 on: December 25, 2011, 09:08:57 PM »
As for programming, as I mentioned before here in the forum, there are three level/steps/hurdles for people new to all this:

1) learning to program (understanding general programing logic and methods, which is independent from any program language/environment)
2) learning to program in a specific programming language (which is much harder if someone skipped on step one)
3) learning to program in a specific OS/programing environment.

Too many people these days are trying to "take the quick route" and directly jump into the deep end of the pool (step 3), only to realize (or not  :o ) that they will drown pretty quickly if they don't have the basics of step 1 and 2 down...  :(

Ralf


:D ... like my daddy always said... "You really don't want to learn to swim in the deep end of the pool... you might not like the lessons it teaches". 

But on the other hand, taking the big plunge is one excellent way to find out who's got the "knack" and who doesn't...

I alway approach programming as a "tunneling in process"... For example, some time back I was approached by an acquaintance who is the warehouse manager for a fastener company... Their warehouse is bins after bins after bins of nuts, bolts, screws, washers, hooks, eyes, you name it, in all imaginable sizes.  To look at the place simply boggles the mind... that warehouse is huge!  Anyway, he needed to do an inventory count of everything in the warehouse.  Each bin was tagged with a part number, description and price... ok... so why do you need me... Our IT guy is lost... So start thinking my way down from the big problem and breaking it down to increasingly smaller steps... finally writing a step by step procedure for the count.  Basically they needed to start at one end with the first bin, gather that information, move to the next bin until they hit the end of the isle... then move to the next isle and repeat, until done... From that I derived a bit of C code: two nested loops, a couple of scanf()s and a quick struct written to a disk file... Less than 100 lines of code gave them the part number, the cost price, the location and a count of every item in the place... a running total was kept and at the end they got the total value of their inventory... The IT guy, with all his C# mastery looked at my code and just burst out laughing... "That's too easy"... he says.

That's programming... not coding. 

I've always maintained that a real programmer's skill is not writing source code... it's more like running a meat grinder, where you constantly reduce the "meat" of your problem to smaller steps until you get it down to manageable proportions.  The second to last thing a programmer does is write code.

I figure the four main skills are...
1) Problem analysis
2) Looking stuff up
3) Writing souce code
4) Fixing your mistakes