On 15/09/2019 20:11, Random D user wrote: > I've been trying to set thread names for debugging, but it seems Mago > just ignores all names. > > Using WinAPI function SetThreadDescription() I can get thread name to > show up in other programs (such as the very sleepy profiler), but not in > Visual Studio and Mago debugger. I also tried the exception method as > described here: > https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2019 SetThreadDescription works for me (in VS2019). If you are using the visualdproj project, do not use "Mago" as the debugger, the "Visual Studio" debugger work better and have D support through a mago based expression evaluator extension. > > > core.thread.Thread also seems broken in terms of thread name. It seems > to just set a local name for the thread, but not communicate that to the > os. I suppose threads in Windows are nameless outside of debugging, so > perhaps that was just a poor d-runtime design choice. > Anyway, Mago doesn't seem to look up the d-runtime name either. > > Is there a way to show thread names in Visual Studio Mago? or is it just > unsupported. > > Also it would be cool if the d runtime would name it's threads, so that > it would be easier and faster to pick the correct one. > Please report to https://issues.dlang.org/
Re: Thread names in Visual Studio and Mago
Rainer Schuetze via Digitalmars-d-debugger Wed, 18 Sep 2019 00:36:12 -0700
- Thread names in Visual Studio a... Random D user via Digitalmars-d-debugger
- Re: Thread names in Visual... Rainer Schuetze via Digitalmars-d-debugger
- Re: Thread names in Vi... Random D user via Digitalmars-d-debugger
- Re: Thread names i... Rainer Schuetze via Digitalmars-d-debugger