Root > Reference > All Functions > NameThreadForDebugging

Procedure NameThreadForDebugging

Previous pageReturn to chapter overviewNext page   

Sets the name for a thread.

 

Unit

EThreadsManager

 

Syntax

 

Code (Delphi)

procedure NameThreadForDebugging(

const AName: String;

const AThreadID: Cardinal = 0

);

 

Parameters

AName [in]

A new name for the thread identified via AThreadID argument.

 

AThreadID [in, optional]

TID (Thread ID) of the thread to set new name for. 0 means current thread.

 

Remarks

Use NameThreadForDebugging to name a thread that was created without a name.

 

Also, use this function to rename a specified thread. AName is the string specifying the new name. AThreadID is the TID identifier of the thread to be named. If AThreadID is 0 or -1, the current thread is renamed.

 

A thread name is also used to specify thread name for the debugger's Thread Status tab.

 

Note

This function is different from the default RTL's System.Classes.TThread.NameThreadForDebugging . This function will update internal EurekaLog thread information storage, so thread name will be used at run-time to insert thread information into bug reports. Therefore this function completes both tasks: sets name for the debugger and stores name for later use in bug reports. Therefore it is recommended to replace existing calls to System.Classes.TThread.NameThreadForDebugging with calls to this function.

 

See also




Send feedback... Build date: 2019-06-14
Last edited: 2019-06-14
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_ethreadsmanager_namethreadfordebugging.php