-2

I am quite new to C programming, so I apologize if my question is not very clear, but I came across the following problem in Visual Studio:

I'm trying to debug a function in my project, however when I put a breakpoint in it I get the following message -

"The breakpoint will not currently be hit. No symbols have been loaded for this document".

I already checked the proposed solutions in Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document." , but none of those worked.

I've cleaned, rebuilt, deleted whatever similar files could be causing a problem, but no improvement. All the symbols are also loading properly.

When I call the function in my code I am getting an output although I can't step in, so I opened the Disassembly and instead of my function, let's call it func1(), there's another function with similar name, _func1(), and I can step in its assembly, but there's No source file available.

Any ideas how to find out where is _func1() located or why on the first place my initial function is not accessed?

Community
  • 1
  • 1
vanya
  • 1
  • 1
  • Please read how to ask a question: http://stackoverflow.com/help/mcve – Mirakurun Jun 01 '16 at 10:13
  • You have to be more specific , you need screen shots , code etc . This question would have been ok to ask to a collegue who was looking at your screen. but when you ask on SO , you need to help people see your problem to get any meaningfull reply. – Pratik Jun 01 '16 at 10:23

1 Answers1

0

To enable debugging: (Also make sure building the programme in debug mode)

1) Goto Project->HelloWorld Properties

2) On the left expand "Configuration Properties"

3) Expand "C/C++"

4) On the left, Select "General"

5) On the right, change "Debug Information Format" to "Program Database For Edit And Continue (/ZI)"

5) On the left, Select "Optimization"

6) On the right, change "Optimization" to "Disabled (/Od)"

7) On the left, expand "Linker"

8) On the left, select "Debugging"

9) On the right, change "Generate Debug Info" to "Yes"

10) Click ok

11) Set your breakpoints

12) Rebuild your application

Mohan
  • 1,871
  • 21
  • 34