Since SQL 2019 CU2, you can use DBCC Stackdump to create mini, filtered, full dump directly without using trace flag.
Here are samples:
DBCC STACKDUMP WITH MINI_DUMP
DBCC STACKDUMP WITH FILTERED_DUMP
DBCC STACKDUMP WITH FULL_DUMP
And this feature will port back to SQL 2017…