0

I am using Visual Studio 2008 for WINCE7 for colibri board. Whenever I put breakpoints to debug my code. Breakpoint become disabled an I got this message when I put cursor on beak point:-

 Breakpoint will not currently be hit. No executable code is currently loaded at this function

The only solution I can find on internet is this. But this solution is not working. Apart from this I restart my PC, delete ,pdb files, Copy my project somewhere and rebuild it. But nothing really helps. What can be possible reasons for this issue how can I solve it.Here is the image of actual scenario:- enter image description here

tabish
  • 274
  • 3
  • 10
  • @ Carcigenicate No My code is fine, It's working and I am inserting breakpoint at the first line of the code. So, by no chance it can miss the breakpoint line – tabish Jun 05 '18 at 12:16
  • Use Debug > Windows > Modules to troubleshoot this. First ensure the executable file for this code is in the list, you can't get a breakpoint as long as it wasn't loaded yet. Next find out how the PDB file for it was found. Right-click the module and select Symbol Load Information. – Hans Passant Jun 05 '18 at 12:30
  • .exe is the first in the list. but on right clicking on it, I am getting this message 'The PE file is not found.' – tabish Jun 05 '18 at 12:33
  • @tabish, If you create a new blank solution, and then add all project files to this new solution, how about the result if you debug it? Do you make sure that this breakpoints on source lines actually executed? Whether you project refer to another project which was not copied to your current project output path? – Jack Zhai Jun 06 '18 at 10:24
  • @Jack Zhai-MSFT: I made a new project and copy my code into it. It's working fine now. But I wonder what exactly happens to my previous project. – tabish Jun 06 '18 at 12:08
  • @tabish, Glad to know that it works well. I just add two possible reasons for this issue as an answer. – Jack Zhai Jun 07 '18 at 01:43

2 Answers2

1

Breakpoint will not currently be hit. No executable code is currently loaded at this function.

(1) Maybe it was related to VS settings. You could compare the VS settings in your two solutions.

Tools->Options->Debugging->General.

Right click your project, view the project properties.

(2) Maybe your project files were corrupted, so we often create a new blank solution or project, and add the project files or code to the new one.

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
  • My code is running properly. Only issue is that it's not allowing me to apply breakpoint, so project is not corrupted for sure. Anyway, I copy my code into new project and it's working. Your are right, it's settings issue but I can't find it even after comparing two solutions. – tabish Jun 07 '18 at 05:20
  • @tabish, If you reset your VS settings for your previous project, how about the result? Please also clean and rebuild your project before you really add the breakpoint or debug it. No project is hard for me to repro this issue, but I'm glad to know that we have resolved this issue with a workaround now:) – Jack Zhai Jun 07 '18 at 08:08
  • I don't how to clean VS2008 settings. Cleaning & rebuilding project doesn't solve the issue – tabish Jun 07 '18 at 08:34
  • @tabish, Tools > Import and Export Settings > (you can choose to import or reset settings). – Jack Zhai Jun 07 '18 at 10:08
  • I figure it out. it's not visual studio settings issue. Actually I am cross compiling my code for colibri T20. It's the board issue. Delete the project file from colibri T20 and reset it. It's will reload the project and will work fine – tabish Jun 09 '18 at 08:16
0

In case of cross compilation, It's not a Visual Studio settings issue, it's the board issue that you are using. Delete the project files from your board and reset it. Then reload the project from visual studio. I will work fine.

tabish
  • 274
  • 3
  • 10
  • Really thanks for your friendly response, you could mark your solution as the answer later. Have a nice day:) – Jack Zhai Jun 13 '18 at 01:40