Visual Studio 2008 debugging issue

I work in VS 2008 and have three projects in one solution. I am debugging by joining a .net process called by a third-party application (SalesLogix, a CRM application).

As soon as he connected to the process, and I try to set a breakpoint in one of the projects, he does not set a breakpoint in this file. It actually switches the current tab to another file in another project and sets a breakpoint in this document. If the file is not open, it even goes so far as to open it for me. I can not explain it. I have no idea. Has anyone seen such strange behavior? I would not have believed if I had not seen.

A bit more information: if I set a breakpoint before attachment, it shows a β€œred dot” and says that no characters are loaded ... no problem ... I expect this. When I attach and call my .net code from SalesLogix and switch back to VS, my breakpoint completely leaves (not even a warning that the source does not match the debug file). When I try to manually load the debug file, I get a message that the symbol file does not match the module .. pdb and .dll have the same timestamp, so I'm at a dead end.

Does anyone have any ideas?

thanks,

Jeff

+4
source share
2 answers

I saw this functionality in older versions of VS.Net (2003, I think). It may still exist in current versions, but I have not seen it. It seems that files with the same name, even in different directories, confuse VS.Net, and it finishes setting the breakpoint in the file with the same name. It can only happen if the classes in the file have the same name. I think for namespaces.

You can also check your build configuration to make sure that all projects are actually being built in debug mode. I know that I was caught a couple of times when the configuration somehow changed for the solution, and some projects did not compile in debug mode.

+4
source

Kibby, you were right! These are two files with the same name in different folders. I set a breakpoint in the correct file on line 58 - it put a breakpoint in another file on line 58. Finally, I was able to set a breakpoint using "Debug β†’ New Breakpoint β†’ Break at Function Name" and enter the name of my function. It stopped exactly as it should have been.

I agree - so much for namespaces, right? Damn it cost me a couple of hours. Oh, well ... at least he decided, and I know why.

thanks for the reply and thanks to Matt for his reply too!

0
source

Source: https://habr.com/ru/post/1276460/


All Articles