Visual Studio 2019 and classic ASP: unable to open script document

Viewed 1370

I need to debug a classic asp application and I'm experiencing a strange behaviour.

This is my setup:

  • site name: loc.testsite.com
  • web site folder: d:\loc.testsite.com
  • entry in hosts: 192.168.1.11 loc.testsite.com
  • iis:
    • Enable Client-side debugging: true
    • Enable Server-side debugging: true
    • Send errors to browser: true

Pages:

default.asp

<!--#include file="include.asp" -->
<%
main

function main()
    stop
    f1()
    
    dim x
    x = 1
end function   
%>

include.asp

<%
    function f1()
        dim a
        a = 1
    end function
%>

When I open loc.testsite.com in my browser, a request to launch debugger is shown due to stop instruction in default.asp. Visual Studio launches and I can see default.asp code. I start debugging with "step into" (F11 in a default environment) and I enter include.asp. I can see include.asp code, now I'm in f1() so I keep stepping till "end function". Now I should return to default.asp at line "x = 1", but I see this message instead: "Unable to open script document". After I press OK the message "Default.asp not found".

I often debug classic asp code and I never faced this issue; this has been happening for about a month.

I tried on two different machines with the same result.

Visual Studio is updated to version 16.7.6.

1 Answers

UPDATE 03/03/2021

A fix for this bug is available in Visual Studio 2019 16.9.

UPDATE 28/12/2019

Microsoft fixed this. Hopefully an update to Visual Studio will be available soon (details here).

ORIGINAL ANSWER

After some research, it seems that this behaviour is due to a bug in Visual Studio. I installed some different versions and this is what I found:

  • v. 16.0.19: bug is not present
  • v. 16.5.5: bug is not present
  • v. 16.6.5: bug is not present
  • v. 16.7.0: first version with bug
  • v. 16.7.6: bug still present
  • v. 16.8 preview 5: bug still present

I filed a bug on Microsoft Developer Community (details here).

Meanwhile I installed v.16.7.6 and v.16.6.5 side by side (see here, section "Install minor Visual Studio versions side-by-side").

Related