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?
連結已複製
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.
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.
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.
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.
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.
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.
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.
