If you want to print a message to the debugger's Ouput Pane you can call the Windows API function OutputDebugString.
The virtual memory address fhat the debugger shows for a thrown exception may not correspond to a line of source code in your application. For example, exceptions could come from DLLs that are loaded into your process for the VC++ runtime, the UCRT, or various Windows system Dlls that comprise the Windows API.
Also, the debugger sees all exceptions, including some that may not be problems (first-chance exceptions that are handled). So if you see exceptions in the debugger output pane but your application runs normally and does not fail that could be what you are seeing. You can get finer control over how the debugger handles exceptions by using the debuggers Exception Settings window -