views:

365

answers:

1

I have a WinForms app in a single project written in VB.Net 2003 (legacy code). There is a MainForm and a SecondaryForm that is run by the MainForm. When I run the app thru the MainForm, I can debug with no problem. However, if I just run the SecondaryForm, I get the debug error, "There is no source code available for the current location", when stepping over,

_routeId = CInt(myVar)

At this point I am no longer able to debug thru my code window, but have to use the disassembled code.

Any ideas why this happens and how to fix this, please?

A: 

I have seen this issue many times... and more often than not it is a reference(s) issue. Is it your code that has "no source" or is it Microsoft code? Do you have multiple versions of the .NET Framework installed?

Double check your references.

Kris Krause
Yes, I have multiple versions of .NET and VS installed. And, it is Microsoft code "CInt()". But, the references point doesn't make sense for 2 winforms in the same project, because they should be using the same references.
Jim
Have you ever set the option in VS to utilize the Microsoft debug symbols?
Kris Krause
I may have. It's VS 2003, so I don't use it very much. Can you give me more specifics and I'll check?
Jim