I was ask to file this issue here by the VS Code team as it appears to be an issue with c# extension.
Original Issue #64625
Detail of original issue is https://github.com/Microsoft/vscode/issues/64625
Copying the details from your original issue:
I recently upgraded my asp.net core project to .net core 2.2 and ever since when I click F5 to debug it takes a long time to launch. Like 30 seconds+.
VS Code version: Code 1.29.1 (bc24f98, 2018-11-15T19:06:21.742Z)
OS version: Darwin x64 18.2.0
@dotnetron There isn't much information in your bug to go on. A few questions:
@gregg-miskelly Sorry, here is some additional information:
Once I hit F5, the build process itself appears to run quick. Subsequently I start seeing output in the Debug Console and the Call Stack slowly starts showing multiple threads spinning up. It spins up Threads #1-#5 and then just stalls for a while. Like 10-15 seconds plus. Then continues with threads #6-#12 and then it launches my app in the browser. While this is occurring, I had Activity Monitor open and CPU utilization seems fine < 15%. As far as memory usage goes the highest consumers are mono-sgen64 & kernel_task both at approx. 450MB.
I will also try running the same project on a Windows 10 machine for comparison sake and post the results shortly.
@gregg-miskelly So, I spun up a Windows 10 VM in Azure (2 vCPUs, 4GB RAM) and pulled down my code and gave it a go. When I hit F5 it takes about 7-10 secs to build. After that I start a timer and monitor how long before a browser launches with my app. It took about 15 secs on the Windows 10 box.
By comparison on my Mac, the build still takes 8-12 secs, however after that to the time the browser launches seems to be taking 80-90 seconds.
Most helpful comment
@gregg-miskelly So, I spun up a Windows 10 VM in Azure (2 vCPUs, 4GB RAM) and pulled down my code and gave it a go. When I hit F5 it takes about 7-10 secs to build. After that I start a timer and monitor how long before a browser launches with my app. It took about 15 secs on the Windows 10 box.
By comparison on my Mac, the build still takes 8-12 secs, however after that to the time the browser launches seems to be taking 80-90 seconds.