You are not logged in.

#1 2013-09-09 23:06:38

emil.s
Member
Registered: 2011-05-22
Posts: 11

Debugging in Eclipse does not work (no variables, "No source availab")

Hello!

I have setup Eclipse for doing some very easy C projects.
The code runs fine if I click the "Run" button, but I can't get the debugger working.

First of all I can't see the values of the variables. And after passing the first breakpoint I get this message:
rsqg.th.png

Any ideas?

Offline

#2 2013-09-09 23:41:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,615

Re: Debugging in Eclipse does not work (no variables, "No source availab")

First, how did you build the application?  Specifically, what are the compiler options.  Did you enable debugging information ( the -g switch) ?
That picture seems to indicate you  are attempting to trace into a library function.  If you want to see into the library functions themselves, then they too need to have debug enabled.

Also, as an aside, that example has the look and feel of homework.  No matter; you have not asked for homework help.  I only mention this to put it on the table so that other members do not need to point it out (yes, the moderators have seen it)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2013-09-10 14:30:07

emil.s
Member
Registered: 2011-05-22
Posts: 11

Re: Debugging in Eclipse does not work (no variables, "No source availab")

Well, the code itself is homework, yes. But since our school is pro-microsoft we are "recommended" to use Visual Studio (Which is working great).
But since I'm here, I don't think I need to say that I'm not a huge fan of windows. wink

I haven't changed any settings in Eclipse, so its all at default settings. I have followed several tutorials, and non of them has said anything about changing any settings for getting debugging to work.
I'm using "scanf" to read the value, so I guess that I have to enable debugging in stdio.h in some way then?

I spoke to my teacher today however, and he suggested that I tried codeblocks.
And In codeblocks everything works as expected (Actually easier than MS VS i think). And since we are only doing some basic labs in a few weeks, I'll be fine with it.

But thanks for the answer anyway! smile

Offline

Board footer

Powered by FluxBB