BUG: Source Code is Not Available for the Current Statement

ID: Q191273


The information in this article applies to:


SYMPTOMS

Upon running an Active Server Pages (ASP) page with Step Into, a Stop/Debugger statement, or breakpoints under the debugger, the user gets the following error:

Source code is not available for the current statement


CAUSE

The behavior is caused by attempting to have the debugger break on a line that is non-procedural script within a script tag (instead of within a <% %>). The break can be caused by an error, a stop or debugger statement, or by a breakpoint on that line.


RESOLUTION

The resolution is to place the script within inline script tags.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Web project.


  2. Add an ASP page with the following code:
    
          <SCRIPT LANGUAGE=JScript RUNAT=Server>
             i = 10
          </SCRIPT> 


  3. Set the project to auto-enable debugging.


  4. Set a Breakpoint on the "i=10" line in the JScript block. Press F5.


The result is the debugger attaches and the following error appears:
Source code is not available for the current statement

Additional query words:


Keywords          : kbide kbVisID600bug kbGrpASP 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 24, 1999