- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to debug a subroutine I just compiled.
It gives no error messages.
But when I run the the program, I get a breakpoint,
and it says "No source code available."
So there is a bad subscript, or something else,
but there is nothing pointing to where it occurred.
Apparently when the breakpoint occurs in an imbedded routine, the debugger cant handle it,
like when I use "contains" for example.
We never had this problem before,
so WHY do they keep putting in new ones?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It could be that it stopped in a library routine where there is no source code. Use the Stack Frame pulldown to select the frame with your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't get "No source code". I created a new console project with all the defaults, built a Debug configuration and started running under the debugger. When it stopped because of the array bounds error, it showed the source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What was your debug configuration, and defaults?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just opened VS2012 and created a new project using all the normal defaults. I didn't change a single setting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I moved it to another computer, and it worked the first time.
But then when I run it again, the same problem occurs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I upload a screen shot?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I noticed that when it does NOT work, it points instead to a disassembly, not any source code.
But then there is no way to see where that occurs, since I cannot display code or line numbers.
When it DOES work I do not get a disassembly, I can see the source code and the pointer to the
breakpoint location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the "Select media" button to upload a screenshot .jpg or .png. Are you exiting the application between runs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NO, I normally make a source code mod, then recompile the affected routines.
Actually, I very often have to insert PRINT statements, to track down the actual source of the problem.
And then I say "restart". Sometimes I just compile the routine to check it first, then restart.
Doesn't the VS automatically recompile any modified routines when i restart the
program?
I noticed that this problem seems to come up MORE often with a larger program.
It is random in nature.
When I do a screenshot, where would it normally put the file? I have trouble finding it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just attach the screenshot as a file - it will show up as an attachment automatically.
At the moment, you're blocked from editing sources during a debug session (that will change in update 1). You might get prompted to rebuild if you manage to make source changes before running, but maybe not. Doing a restart doesn't recompile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I experimented with it -
When I insert a blank line, it automatically recompiles the routine without my asking first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why not set some breakpoint in your code, eg at line 371 which is that last line of your code executed before it drops into system code and throws and exception at then you get an automatic breakpoint. Your code has broken a few step before this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Line 371 does not exist anywhere in my source.
That line number is the one for the machine code, we cant set breakpoints there.
It does not give line numbers for the source code where the breakpoint occurs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please attach a zip of the buildlog.htm from the Debug folder of the project after you do a rebuild.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, here is one I just did - buildlog_4.zip
apparently the debugger cannot link up my source code with the machine code.
Because even when I ask for a display of the source code lines, I get nothing, just the machine code.
That explains why we dont get the arrow pointing to the offending source code line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - I don't see anything unusual in the build log. I don't know what is causing the behavior you see. It's not something I've seen reported by others.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page