Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

please help me with the following problem.

I want to debug a process in a remote system. The process loads DLLs and I want to hit a breakpoint in one of them. I compiled this DLL and placed it into that system. Then I connected remotely to the system by the debugger. But VS2010 shows me message "Breakpoint cannot be hit. No symbols loaded".

When I go to Debug -> Modules and search for my module (DLL), I can see that the DLL was loaded into that process and the symbols for that DLL were loaded as well - from correct path. But still, the breakpoint cannot be hit. (I didnt modify the source code anyway and I didnt re-save it either. So the pdb definitely fits the DLL).

Can you please give advice ?

Many thanks,
JK
Posted
Comments
Sergey Alexandrovich Kryukov 17-Mar-14 12:56pm    
Do you have source code of the DLL in question? PDB?
—SA

This is not about the presence of your DLL module itself. You need to create and enable debug information (in particular, PDB, please see below), which may require rebuild of you module with different (debug) options. You can learn Visual C++ documentation on debug information and appropriate version, but one simple way is to use the predefined configuration "Debug" which, by default, provides support of all debug features. Again, it should be provided for your DLL module in question, not just for the module(s) using that library module. In principle, it's possible that the options, by some reason were modified for "Debug" configuration to disable some debug information. The configuration is just the configuration, something designed to group many options and properties of the project together, the properties themselves can be anything, so the mere name "Debug" does not guarantee the debugging.

If you have no source code for this module and no *.pdb file (program database file, which carry symbols needed for debugging) for it, there is nothing you can do except debugging without symbols, which is not effective.

For more detail, please see: http://support.microsoft.com/kb/291585[^].

—SA
 
Share this answer
 
v2
Comments
Kucera Jan 17-Mar-14 13:06pm    
Hi, thanks for reply. I do have the source code and generation of Debug Info is enabled in both Release and Debug configuration. But still no success. It seems as if the pdb file (that I got during the DLL compilation) was somehow corrupted or so... Any other idea ? Thx
Sergey Alexandrovich Kryukov 17-Mar-14 13:23pm    
Then you should have no problems. Corrupted? Fully clean the project and rebuild 100% from scratch...
—SA
Kucera Jan 17-Mar-14 13:30pm    
It is a new TFS workspace, and the sources are "latest version". Does not help :(
Sergey Alexandrovich Kryukov 17-Mar-14 14:41pm    
How is that related to TFS? I don't know what have you tried, exactly, but I already mentioned, you might want to build all the DLL project from scratch, with the same source code, only creating a new project. Or you can create a brand-new sample DLL, just to look at the options and compare it with the options you have in your current project.
—SA
Abhinav S 17-Mar-14 13:14pm    
5.
You have followed all steps right, however these links might just help you -
http://msdn.microsoft.com/en-us/library/y7f5zaaa.aspx[^]
Remote debugging for Visual Studio from different domains[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Mar-14 13:23pm    
Sure, a 5.
—SA
Abhinav S 17-Mar-14 13:37pm    
Thank you.
Kucera Jan 17-Mar-14 13:28pm    
Thanks, much. But I have the set-up correct I believe. This is not my first time I am debugging remotely. The problem is that I created a new workspace and since then (probably) I cannot do the debugging. The trouble is that they dymbol file is correctly loaded (according to the module view in VS2010) but probably not used - as if it was corrupted. Finally I found that I cannot remote-debug from the old workspaces either...
Sergey Alexandrovich Kryukov 17-Mar-14 14:49pm    
No it is not correct, by one or another reason, otherwise it would work for you. Yes, I am sure. Please see my comments to Solution 1.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900