Trottero / dotnet-watch-attach

Dotnet watch attach vscode plugin
7 stars 7 forks source link

dotnetwatchattach stalls VSCode on Windows if custom PowerShell Profiles take some time to load #17

Closed hackathi closed 6 months ago

hackathi commented 6 months ago

Just chirping in here: I also encounter this problem, additionally, every rebuild triggered through watch freezes the VSCode UI for about 30s, sometimes longer.

I have unfortunately no clue how to debug a VSCode extension, nor a setup. If someone knows of a good tutorial, I'd be open to give debugging and PR'ing a shot.

Originally posted by @hackathi in https://github.com/Trottero/dotnet-watch-attach/issues/16#issuecomment-2074647185

Turns out, this is unrelated – and I found the culprit just by looking at the sourcecode. See, I use OhMyPosh to make powershell usable, but that means new powershell sessions take some time to load.

Solution is to use the -NoProfile switch in https://github.com/Trottero/dotnet-watch-attach/blob/05e2da6ca5b01aaf8b8e8870c8cb92b74a5a22f7/src/watchAttach.ts#L168 to skip loading profiles.

PR incoming :)