What exactly is a thread exit code in the Output window while debugging? What information it gives me? Is it somehow useful or just an internal stuff which should not bother me?
The thread 0x552c has exited with code 259 (0x103).
The thread 0x4440 has exited with code 0 (0x0).
Is there maybe some sort of list of possible exit codes along with its significance?
what happened to me is that I have multiple projects in my solution. I meant to debug project 1, however, the project 2 was set as the default starting project. I fixed this by, right click on the project and select "Set as startup project", then running debugging is fine.
There actually doesn't seem to be a lot of explanation on this subject apparently but the exit codes are supposed to be used to give an indication on how the thread exited,
0
tends to mean that it exited safely whilst anything else tends to mean it didn't exit as expected. But then this exit code can be set in code by yourself to completely overlook this.The closest link I could find to be useful for more information is this
Quote from above link:
From the Documentation for GetEXitCodeThread
My understanding of all this is that the exit code doesn't matter all that much if you are using threads within your own application for your own application. The exception to this is possibly if you are running a couple of threads at the same time that have a dependency on each other. If there is a requirement for an outside source to read this error code, then you can set it to let other applications know the status of your thread.
As Sayse mentioned, exit code
259 (0x103)
has special meaning, in this case the process being debugged is still running.I saw this a lot with debugging web services, because the thread continues to run after executing each web service call (as it is still listening for further calls).