There is no source code available for the current location JIT Debugging
-
Wednesday, January 05, 2011 12:27 PM
I am trying to get the JIT debugger to work and am having this frustration: I create a short program in a visual basic 2010 windows forms application in visual studio professional 2010 that triggers an array out of bounds exception. I run the program by clicking on the .exe version of the built program in the debug folder. I have enabled JIT debugging and there is a pdb file located in the same directory as the .exe file. I have included an app.config file so that the visual studio 2010 debugger does indeed start, but I get the message "There is no source code available for the current location." The option to Browse to find source is greyed out. If I load the entire solution in a Visual Studio instance and then leave it to run the .exe file, it will return me to that same exact instance of visual studio and so I have the source code right there, but still the executing version can't find the source code. When I view the call stack, it shows my command line call but clicking on the two items in the call stack does not bring up my source code. I have tried all manner of options, just my code enabled or disabled, enabled manage, native, and script debugging, and really checked or unchecked about every box imaginable. I am running under vista. The debugger works fine if I load the project in visual studio and step through it. I have tried using the symbols server and downloaded a ton of those which did not help the problem.
A second debugging issue: When trying to debug a dll which is called by msaccess, I am unable to download symbols for msaccess and therefore can't set breakpoints in the dll. A lot of other symbols get downloaded but not those for access. I need to be able to set breakpoints in the dll.
All Replies
-
Wednesday, January 12, 2011 2:23 PMModerator
You may specifies where the debugger will look for source files when debugging the solution using the Debug Source Files option: to access the Debug Source Files property page, right-click on your Solution in Solution Explorer and select Properties from the shortcut menu. Expand the Common Properties folder, and click the Debug Source Files page.
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.

- Marked As Answer by eryangModerator Monday, January 17, 2011 7:30 AM
- Unmarked As Answer by DanProgrammer Thursday, January 20, 2011 1:55 AM
-
Wednesday, January 19, 2011 7:26 AM
Eric,
Thanks for writing. Unfortunately, this still does not solve my problem. If I right click on my project in the Solution Explorer and select Properties from the shortcut menu, a screen is displayed which lists "Application, Compile, Debug, References, Resources, Services..." down the left hand column. Examining all of these choices, at no time does a Common Properties folder appear. There is no mention of the Debug Source Files page anywhere. Are you suggesting that when users in visual studio 2010 right click on their solution in the Solution Explorer, that a subfolder appears with a choice of 'Common Properties' ? I am not seeing that behavior in Visual Basic 2010 . Instead, I immediately get a window showing the above mentioned choices with no option that I can find anywhere which allows me to set the Debug Source files page.
- Edited by DanProgrammer Thursday, January 20, 2011 1:57 AM clarification
-
Monday, January 24, 2011 1:53 PMModerator
Please right-click on your Solution (not Project) in Solution Explorer and select Properties.
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.

-
Tuesday, January 25, 2011 6:53 AM
Eric,
Ok, the first problem is that the default configuration in Visual Studio 2010 for Visual Basic is that the box 'always show solution' is not checked. So, there is no solution that appears in the solution explorer, only a project appears. I did then go tools, options, projects and solutions, general and checked the box 'always show solution.' Now, I can right click on the solution and point visual studio 2010 towards the folder where the source code is for my solution as you have recommended.
Unfortunately, the same problem persists. Visual Studio 2010 as configured for Visual Basic cannot find the source code and I get exactly the same error. Now, the JIT debugger has actually loaded the source code file and it appears in a tabbed window just to the right of the tab which reads "No Source Available." So now I have the JIT debugger telling me in one window that there is no source available and in the very next window is the source, but the offending line is not marked. I'm also told "no symbols are loaded for any call stack frame."
if I just click 'stop debugging' and then 'start debugging' and restart the program from within this JIT Debugger instance of visual studio 2010, it will now find the offending line and stop on it. But this is, obviously, not JIT debugging. Why can't the JIT debugger find the offending line the first time it is called? Has anyone, anywhere been able to get the JIT debugger to work in visual basic 2010 for a windows forms application?
I guess, Eric, what I'm asking here is that if you download and install a fresh out of the box copy of Visual Studio 2010 and set it to run Visual Basic and create a project and add the tag <system.windows.forms jitDebugging="true" /> to the app.config file, is it the default behavior that the JIT debugger works? We're talking a brand new freshly installed copy of visual studio 2010 with all defaults as they are and a 2 line program with a bug in it. Does the JIT debugger work for a windows forms application on your version for visual basic?

