Search code examples
node.jsdebuggingvisual-studio-2022

Visual Studio 2022 Unknown thread id '0'


I'm developing a nodejs web application.

I haven't had visual studio opened in some months, and I've updated from windows 10 to 11 since then, so I'm unsure at what point this problem started to occur.

Whenever I start debugging in Visual Studio 2022 I'm getting this error if I close down the console window while visual studio is on a break point or on an error.

error 2

When I click OK it takes a few seconds and I will get this error. If I click Stop Now or just wait it will take a little while (about 30 seconds) and the program will exit debugging

error 1

I have tried reinstalling Visual Studio.

I have tried deleting the .vs file

I have tried using a blank project.

Searching any of the errors on google doesn't give me anything. At All.

The error persists and its incredible annoying to have to wait that long if I forget to continue the debugging before closing down the console

** UPDATE **

I tried updating nodejs to the most recent version (23.6.1) without any luck.

I also tried running other types of projects (C# console app, Blazor web app) to check if I'm running into the same error, which I'm not. They are working as expected

** UPDATE 2 **

I posted the error on the Visual Studio forum and they guided me towards the preview edition which does fix the error. So for now you can use that to get around the problem, and in the future this should have been fixed


Solution

  • I followed you steps and can reproduce this issue in VS2022(17.12.4). I also noticed an error message "The thread 'app.js [11036]' (0) has exited with code 0 (0x0)." in output window. Looks like it's a product issue.

    I would suggest you to report this issue at Visual Studio Forum. That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and investigate your issue.