How to display source files in output or error window as relative path to workspace

Mohammad Mohsin Siddiqui 175 Reputation points
2023-08-29T04:45:51.2733333+00:00

We are using Visual studio IDE for cross platform development and windows is our developer environment. So my Visual Studio IDE runs on Windows and I do build windows as local build and Linux, Mac builds as remote builds on remote build machines.

This works perfectly fine. When any error or warning happens, it displays message like below

/home/mohsin/Workspace/TallyWorld/DevSupportPlatform/TWDevSupport.Source/TWDebug/TWDebug.cpp:6:1: error: unknown type name 'dfssdfsdf'

dfssdfsdf

^

1 error generated.

Since path it shows is remote file path on which if I click it wont open file in VS.

What I am looking is that how I can click on this remote file path and open it in VS. Is there a way I can display only relative path from Workspace path and then may be on lcik it will work? Or new Remote Explorer view can give some benefits here. I am using 17.7.2 version of VS professional edition.

All I want is to open a remote file path displayed in error /warning erros logs in VS only on click of that file.

Any help would be greatly appreciated.

Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-08-30T06:56:11.8866667+00:00

    Hello @Mohammad Mohsin Siddiqui ,

    Welcome to Microsoft Q&A forum.

    Normally, the error message, which is generated by VS and shown in, for example Output Window, cannot be customized or changed.

    If double clicking the path but the file cannot be opened, or right clicking the error message, there’s no related options to jump to the file, then probably, you can’t directly open it by clicking it. And it is not possible to specify showing relative or absolute path in the error message.

    Or new Remote Explorer view can give some benefits here.

    The Remote File Explorer supports browsing(file directories), uploading, and downloading files/folders on your remote machines. Directly opening the file by clicking the path/message may not work.

    If you do want this feature, please kindly submit a suggestion ticket on our Developer Community.

    Have a nice day.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.