Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test hangs when in debug mode - VSCode - dotnet 9 #1246

Open
erwinkramer opened this issue Nov 18, 2024 · 10 comments
Open

Test hangs when in debug mode - VSCode - dotnet 9 #1246

erwinkramer opened this issue Nov 18, 2024 · 10 comments

Comments

@erwinkramer
Copy link

erwinkramer commented Nov 18, 2024

If running tests, it works just fine. If i go into debugging instead of running, then it straight up doesn't do anything but hang.

Might be similar to #1018, but i got a repo to test with.

Check out https://github.com/erwinkramer/bank-api/blob/main/BankApi.Tests/Program.cs where i have the 'broken' setup.

Running in the latest VSCode on Windows with the extensions as written in extensions.json and the VSCode setting as specified in settings.json.

By the way, it is a dotnet 9 project.

Trying to cancel the run is also unresponsive when it's hanging:

image

@erwinkramer erwinkramer changed the title Test hangs when in debug mode Test hangs when in debug mode - VSCode - dotnet 9 Nov 18, 2024
@thomhurst
Copy link
Owner

Hmm interesting. Do you know if it affects any other IDEs or have you not tried?

@erwinkramer
Copy link
Author

@thomhurst just tested in Microsoft Visual Studio Community 2022 (64-bit) - Preview and that works fine.

@thomhurst
Copy link
Owner

Wonder if it's a VSCode bug then. I'll see if I can replicate - I don't really use VSCode for .NET normally

@erwinkramer
Copy link
Author

Wonder if it's a VSCode bug then. I'll see if I can replicate - I don't really use VSCode for .NET normally

Let me know, i guess if you have the same issue i can report back at https://github.com/microsoft/vscode-dotnettools/issues?

@thomhurst
Copy link
Owner

Yeah same happens for me - I reckon it's worth opening an issue with them

@erwinkramer
Copy link
Author

Yeah same happens for me - I reckon it's worth opening an issue with them

Done

Copy link
Contributor

github-actions bot commented Jan 2, 2025

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 2, 2025
@erwinkramer
Copy link
Author

/keep

@github-actions github-actions bot removed the Stale label Jan 3, 2025
@rschili
Copy link

rschili commented Jan 7, 2025

Just came here to say I'm facing the same problem. I started using TUnit on some side projects before using it for something bigger, and my main IDE is vscode. This is almost a deal breaker for me. The only workaround that I found is not using the testing platform and instead build+run/debug the .exe like any application. But that's quite inconvenient.

"Run Test" works fine. "Debug Test" does not even begin executing the test code, so it's not an attach problem, the tests do not run at all.

@thomhurst
Copy link
Owner

There's an issue on the vscode repo. It's been pretty silent though so might be worth making some noise on it:

microsoft/vscode-dotnettools#1616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants