NO

Author Topic: debugger not showing source code  (Read 6350 times)

golite

  • Guest
debugger not showing source code
« on: October 19, 2013, 03:11:12 PM »
I have read very carefully all the information available in the help files and as far as I can tell I have configured the IDE to do debugging. I have also watched a video on Youtube that pertains to Pelles C debugging. As far as I can tell I am doing just what is stated to do.

I am running windows xp with service pack 2 and I'm trying to write an application that requires a MDI interface. My statusbar will not resize when the main frame is re-sized. I can almost make out where the problem is but I thought if I could get the debugger to let me step through the code line by line that I would soon see where the problem is. The biggest problem is that I have cobbled together code from 4 different sample applications and it's a mess.

I can't get the debugger to let me see the code line by line. It shows assembly language I think.
Now I'm not one of those folks who hates help files. I have been studying the forum here and I have studied the MSDN API on MDI applications. The discussion sections as well as the code sample sections. It's a little bit of work to convert everything they do in MSDN to plain c but I'm getting that part just fine I think.

It's very hard to be specific when you don't know what to ask. But for now I think if I can overcome the debugger hurdle I can get a long ways down the road in solving other problems.

Pelles Version 7.00.355

Thanks

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: debugger not showing source code
« Reply #1 on: October 19, 2013, 04:00:40 PM »
Searching the whole forum for debugger revealed the thread quick tutorial on using the debugger.

Does that help?
---
Stefan

Proud member of the UltraDefrag Development Team

golite

  • Guest
Re: debugger not showing source code
« Reply #2 on: October 19, 2013, 04:51:59 PM »
It doesn't say a thing about viewing the source code. I assume that part already works for that tutorial and is not discussed.

I'm doing something fundamentally wrong but can't figure out what.
Thanks though.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: debugger not showing source code
« Reply #3 on: October 19, 2013, 08:39:05 PM »
The debugger also will drop into the assembler view if the application throws an unhandled exception (null pointer etc...).  If that should happen you can simply step over the code until the display pops back to the source and you can see where in the code the exception occurred.

Does that explain how to get out of assembly view?

In addition have you installed the debug/release build switcher add-on, so it is easier to switch between these compiler modes?
---
Stefan

Proud member of the UltraDefrag Development Team

golite

  • Guest
Re: debugger not showing source code
« Reply #4 on: October 20, 2013, 10:36:39 AM »
Yes. I have that showing in the tab of the Add-Ins "Switch between debug, release and profile build" and I can also see the REL DBG PRF action buttons in the upper right corner of my screen. When I click on the DBG I can see "Writing debug information" and it is followed by "Compacting codeview information" at the bottom left of my screen.  It looks like maybe I don't want the compaction of codeview to kick in. What do you think?

Thanks for your interest.

czerny

  • Guest
Re: debugger not showing source code
« Reply #5 on: October 20, 2013, 11:43:35 AM »
Hi golite,
it looks as if you have installed an Addin to switch between debug and release mode. This addin might be helpfull but it is not necessary!
What people often seem to forget is, to say both the compiler and linker to produce debugging information. Go to the profile options dialog and switch on debug information in the compiler and linker tab.

czerny

golite

  • Guest
Re: debugger not showing source code
« Reply #6 on: October 20, 2013, 11:00:27 PM »
When I click on DBG and look at the project options everything seems to be set for debugging.
This includes compiler, assembler and linker. When I click on REL and look over the project options it is plain to see that all debug options are set to "none".  So I think that the debug configuration has to be right.  Now does it give you a clue as to what might be happening if I tell you that I am not even getting the code to stop at a break point?

This is all going to boil down to some stupid thing that I've touched unaware of the trouble I've got myself into. I'll try and start a brand new app and follow the youtube video to the max using their new project before they teach about debugging.

If you think of what could be wrong let me know. It has to be in the settings or rebuilding or something. I do get a debugging process. It's just that I need to see the source code line by line. And the watch windows work so I'm not completely shut down.

Thanks Again.

golite

  • Guest
Re: debugger not showing source code
« Reply #7 on: October 20, 2013, 11:13:22 PM »
I just followed Cheryl Schramm video to the letter and my ide did not do what her's did. So I think I'm going to have to install a new Pelles C after removing the current installation. I'll let you know how that turns out...

golite

golite

  • Guest
Re: debugger not showing source code
« Reply #8 on: October 20, 2013, 11:40:16 PM »
I just did a complete new download and installation and got the same result. I was mindful to uninstall the previous installation. I am now going to try to install the 6.50 version. I am using widows xp.

I'll let you know...

golite

  • Guest
Re: debugger not showing source code
« Reply #9 on: October 20, 2013, 11:57:49 PM »
Ok! you got me. The 6.50 version did the same thing.
Please forgive me for having to rule out a problem on your end.

Please elaborate on the add-on that you said I needed because that has to be it. How do you do install the add-on and verify that it is installed?

Thanks Again

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: debugger not showing source code
« Reply #10 on: October 21, 2013, 05:07:18 AM »
Ok! you got me. The 6.50 version did the same thing.
Please forgive me for having to rule out a problem on your end.

Please elaborate on the add-on that you said I needed because that has to be it. How do you do install the add-on and verify that it is installed?

Thanks Again
You don't need no add-in to get the debugger working!!!!

Please zip up a sample project of yours and upload this to the forum, so we can have a chance to see what you are doing. Yes, as you previously said, you seemed to be something fundamentally (as in simple) wrong, it is just hard to tell without a working crystal ball.

Ralf

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: debugger not showing source code
« Reply #11 on: October 21, 2013, 06:42:13 PM »
Debugger shows assembly when debug information isn't available.
  • operating system code ?
  • static linked or dynamic crt library ?
  • static linked libraries without debug-info ?
  • incorrect debug-info ?
  • sourcecode is missing ?
If someone use Debug option Always break on entry-point, they see assembly first before main or WinMain function.
« Last Edit: October 21, 2013, 06:45:00 PM by timovjl »
May the source be with you

golite

  • Guest
Re: debugger not showing source code
« Reply #12 on: October 21, 2013, 10:22:42 PM »
"Always break on entry-point" was selected. I unselected it and guess what?
Yep. It works now. I see the line by line step through in my source code.

Thank you, thank you, thank you,
golite