Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've a solution which is ported from VS (Visual Studio) 2010 to VS2017 from one machine to another. I could debug while I can't. I need to know what's the problem. When running, I see the breakpoint marks get changed to include a warning, but I can't find what can be wrong. It seems that everything is ok. The code is in C#.

What I have tried:

I got sure that the DEBUG and TRACE constants are defined. I'm also using the Debug mode.
Posted
Updated 26-Dec-17 5:21am
Comments
[no name] 26-Dec-17 8:38am    
"When running, I see the breakpoint marks get changed to include a warning": And the warning message is?
ilostmyid2 26-Dec-17 10:52am    
The breakpoint will not currently be hit. No symbols have been loaded for this document.

Start by checking the build mode: is it set to Debug on the menu bar, or Release?
Then check how you are starting execution: F5 is debug, CTRL+F5 is execute without debugger.
Also check if you are trying to debug an assembly that is referenced as the Release version: if so, you can't debug into it easily.
 
Share this answer
 
v2
Comments
ilostmyid2 26-Dec-17 10:59am    
build mode is Debug. i use F5. i'm not going to step into assemblies. the line with the breakpoint is located in my own code.
You haven't explained a problem at all, nor given any of the error messages you're seeing.

But, I can tell you that the breakpoint changing to a little warning means that there is no way the code you tagged for a breakpoint will ever be hit because there is no code that calls the method you put the breakpoint in.
 
Share this answer
 
Comments
ilostmyid2 26-Dec-17 11:31am    
as i told before, the warning is:
The breakpoint will not currently be hit. No symbols have been loaded for this document.
now what can i do? i see the PDB files there.
Dave Kreskowiak 26-Dec-17 12:09pm    
Yeah, I didn't see that comment you put in until after this was posted. It would have been nice had to put that information in the original post.

The PDB files are apparently not where VS is expecting them, probably because this a messed up conversion. The paths between where the project was on the old machine are different from where they are on the new one.

So, you can try doing a Clean Solution and then Rebuild Solution (both under the Build menu.)

Beyond that, you can open the .SLN and .PROJ files in your project folder and inspect them for the bad paths on your old machine, replacing them with the good paths on the new machine.

ilostmyid2 26-Dec-17 13:25pm    
the directories hierarchy is the same. i did a clean and rebuild with no success.
Dave Kreskowiak 26-Dec-17 15:02pm    
I said nothing about the directory hierarchy. I said OPEN THE .SLN AND .PROJ files (notepad) and examine them for the old paths, including DRIVE LETTERS.
ilostmyid2 1-Jan-18 11:53am    
they're not absolute paths. so include no drive letter. they're relative paths.

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