Breakpoints not working multi project solution

N

Nick Gilbert

Hi,

I have a solution which contains 3 projects. (The main GUI, a WebBrowser
component and the Cassini web server). Occasionally an exception will
occur in my application. I cannot narrow down where the exception is
occuring because VS.NET says "no source code is available for this
location" (or similar).

Why is VS.NET not available to debug all parts of the application? It
seems that I also can't set breakpoints in the other projects - they are
just ignored. All my projects are set for debug build and PDB files are
generated when I compile.

Could it be because parts of the code are executing in a separate
thread? Can VS.NET not debug multi-threaded applications?

An example of a project I'm having this issue with is the sample code
here:
http://www.microsoft.com/belux/nl/msdn/community/columns/desmet/hostaspnet2.mspx

Any help on this would be greatly appreciated.

Thanks,

Nick...
 
J

Jeffrey Tan[MSFT]

Hi Nick,

Thanks for your post.

I have downloaded the sample project from the link you provided and
reproduced out this problem. After doing some research, I found that it
seems that this may has something to do with the timer component, below is
a known bug about this:
"There is no source code available for the current location"
http://support.microsoft.com/default.aspx?scid=kb;en-us;329247

Then I followed the KB's workaround to replace the winform timer component
with System.Timers.Timer server-based component. Now, we the exception is
thrown, a winform runtime exception dialog(I think this may due to
server-based timer component, however I am not sure) will generate with
full call stack in it. With the call stack, I think it is easy for you to
find which statement caused this problem.

Additionally, I found something strange, that is, if we then replace the
server-based timer component with the original winform-based timer
component, the original "no source code" problem will go away. I have tried
this twice, both will get rid of this problem.

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi Nick,

Does my reply make sense to you? Is your problem resolved? Please feel free
to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top