it works just file. I use IIS, but you can use IISExpress.
- Map the source folder to its so the site runs.
- In IIS asp config select debug = true
- open code folder with vs 2022. set a break point
- open site in browser
- in vs2022 attach to the appool, and select script debugging
- refresh the page.
you can also make a dummy project. create an asp.net empty web site. this creates a solution file. delete the bin folder and packages.config. copy the files to your asp folder. now open the project. set debugging to custom server http://localhost/<site>. set the start page. start without debugging and attach as above.