Possibly expensive stored procedure (the original app author has moved on) and would like to view the actual query plan for a single stored proc in context of the running app.
Makes sense.
But as I said, it is not really recommendable. It is better to figure out exactly which SET options the application uses, and then run from SSMS. You can use the plan cache queries that Olaf posted to verify that you get the right options. To wit, I would expect that the entry used by the application has the highest execution_count. (Assuming that it is a static query without OPTION (RECOMPILE).
If you are on SQL 2019, there is another option. You can do:
ALTER DATABASE SCOPED CONFIGURATION SET LAST_QUERY_PLAN_STATS = ON
Once the application has executed the procedure, you can use a variation of this query to get the actual plan:
SELECT qp.query_plan
FROM (SELECT DISTINCT plan_handle, sql_handle FROM sys.dm_exec_query_stats) qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) est
CROSS APPLY sys.dm_exec_query_plan_stats(qs.plan_handle) qp
WHERE est.objectid = object_id (@procname)
AND est.dbid = db_id(@dbname)
A friend said to do this using extended events instead of profiler because profiler is slow and deprecated.
Indeed, tracing with Profiler directly can be a true disaster. Most often you should run the trace server-side. Although, for this particular case, don't think there would be any difference, since the number of events are small.
And, also true for many events, extended events has lower overhead than Trace. But in the particular case of actual execution plans, X-Events is unbelievably expensive.