Can't see source code in called code after VS 2010 profiling session.
-
Monday, January 31, 2011 3:13 PM
I'm puzzled, I am running an app under VS 2010 profiling wizard.
The app runs and completes but when I try to sees src code for called code it says "Source code not available. You may not have the appropriate symbol paths or there was an error loading the symbols."
The app refers a test class library, the librray and its PDB are both in the same folder as the .EXE (because the EXE project has "Copy Local" set for the library).
If I just debug the app the src code is fine as expected.
It is the "Function Details" window that says this, but if I use any other options and try right clicking on method names in the library, the "View Source" option in the context menu is greyed out.
So, the src code is valid and available, the PDB and DLL for the called lib are valid and in the correct place (else an ordinary debug session wouldn't work) so I am pretty sure this is a bug in Visual Studio 2010.
I haven't tried this test with the library defined as a project in the same solution as the EXE, but I shouldn't need to either, this looks like a bug is there a workaround?
Also, my test app calls an operation in the library (Comms.SendMessage() ) and I can see this takes a long time, but I cannot see a) the source code or b) any functions called by SendMesage (and there are plenty) it's as if the analysis is limited to one function call deep, if I try to look at functions called by SendMessage it just says "Bottom of stack", this too is very bewildering (all the functions called by send message are also in the same library DLL as SendMessage, so this is most confusing).
Thanks
Cap'n
- Edited by Captain Kernel Monday, January 31, 2011 3:29 PM addditional
- Edited by Captain Kernel Monday, January 31, 2011 3:30 PM spell
- Edited by Captain Kernel Monday, January 31, 2011 3:30 PM text
All Replies
-
Wednesday, February 02, 2011 7:46 AMModerator
Hi,
Thank you for your question, we're doing research on this case, it might take some time before we get back to you.
If this issue is urgent, please contact support at http://support.microsoft.com.
Eric Yang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, February 04, 2011 2:26 AMModerator
Hello again Cap'n,
Please take a look at my answer for your other call depth question. We only will show you source code for the modules you instrumented. In instrumentation mode, we do provide data on any call out of the instrumented binary but without instrumenting that binary itself, we don't grab the source line information (and hence, no source information). This is why you should be seeing source code for some methods (if they are in the instrumented binary) and no source code for any direct call out of that binary.
Try adding additional binaries for instrumentation by right-clicking the targets node in the performance explorer.
Note that instrumentation can collect a lot of data and adds significant overhead so try to only instrument the binaries where you believe the performance problem is.
Thanks again. I hope this information helps.
Marc Paine [MSFT]
Visual Studio Profiler QA LEad
- Marked As Answer by Marc_msModerator Friday, February 04, 2011 2:26 AM
-
Saturday, February 05, 2011 4:34 PM
Thanks for explaining all this, it is greatly appreciated.
It looks fine now and we're getting great results back.
Thx
Cap'n

