perfview icon indicating copy to clipboard operation
perfview copied to clipboard

Allow choosing "Goto Source (Def)" editor

Open BruceForstall opened this issue 9 years ago • 12 comments

Currently, it opens a TextEditorWindow (or notepad2, if on the path?). Allow this to be customized, so the user can choose, for example, VIM or Visual Studio.

BruceForstall avatar May 16 '17 22:05 BruceForstall

@vancem I think I can provide a PR for this, but I'm unsure about where to place the setting for specifying the executable to use for the source files. Should it be under File => "Set Text Editor" (similar to "Set Symbol Path" and "Set Source Path")?

mikkelbu avatar Nov 17 '17 23:11 mikkelbu

Today PerfView does have a configuration story (the AppData\Roaming\PerfView\UserConfig.xml file) but the UI for it is not really there.

But I also believe it is useful for some things to be controlled via Environment variable as well (we already do this with _NT_SYMBOL_PATH and _NT_SOURCE_PATH). This allows people to configure PerfView with scripts.

Thus one simple way of dealing with this is to define an environment variable for it (e.g. PerfView_TextEditor) and simply document that.

In the end, we probably want a 'User Config' dialog that lets you set users preferences like this. Indeed Clear User Config and 'Set Symbol Path' (and set Source Path' should be under that.

However that is a bigger change. I OK with simply hading a 'Set Text Editor' under the 'File' menu item as you suggest in the short term.

vancem avatar Nov 20 '17 16:11 vancem

Hi,

I would like to contribute to this project. I believe this is a good issue to start with if nobody is actively working on it? Also, Could you point me to any documentation, build instructions, etc. to understand the code base, and start with this? with regards to the issue, would it suffice to have a menu item? Thanks in advance for the help.

venkateshpotluri avatar Apr 12 '18 07:04 venkateshpotluri

No one is activity working on it. The main GitHub page https://github.com/Microsoft/perfview has some getting started guidance.

The environment variable approach is the easiest because it does not require any change to the user interface (we will need to document it (update userGuide.htm)).

You should also consider if you wish to tackle the large item of allowing update of user config (and this would be just one piece).

vancem avatar Apr 12 '18 19:04 vancem

Hi everyone! I'll work on this one. VS Code isn't capable of compiling the source?

cirojr avatar Oct 08 '18 22:10 cirojr

VS Code isn't capable of compiling the source?

I don't understand your question. The issue is what editor if fetched when you do a 'Goto Source' command. The source will be fetched one file at a time from a source server, and thus is not buildable by any tool in that form (it would only be one file).

It is certainly possible to set up your symbol path and source path so that it finds the source code in some local directory which you DID set up to be buildable. However keep in mind that most tools (like VS, and VSCode), know how to edit a single file if launched one way, and open a whole solution if launched another (e.g. opening the *.sln).

This work item has modest goals, to allow users to choose their editor. Making it set up so that it hops to a IDE set up to build the source woudl be nice, but probably needs some features from the IDE to make work. Feel free to think about that, but that is really more than what was being requested here.

vancem avatar Oct 08 '18 23:10 vancem

@vancem I think that @cirojr wants to use VS Code to compile this repo to work on this issue.

adamsitnik avatar Oct 08 '18 23:10 adamsitnik

Exactly! Sorry if didn't make it clearer. But VS Studio is a better tool to visualize the xaml files, I think. I would like to make a little overview in the repo first. Thanks anyway.

cirojr avatar Oct 09 '18 00:10 cirojr

Ahh, I see. I don't know the limits of VSCode, but PerfView does have both native and managed components, and is a moderately complex project. There are probably blocking issues, but if anyone want to investigate I can give them information about the PerfView project. (should be done as its own issue/pr)

vancem avatar Oct 09 '18 00:10 vancem

Hi @vancem! I've did the changes in UI too, making a "User Config" menu item, with the three sub options. I reutilized the same SymbolPathDialog to save and retrieve a Text Editor path. My doubt now is: I'll need to call the run command just with the editor path and the "sourcePathToOpen", without the "/g" parameter or the line number, because the editor configured may does not accept them. Am I right? I'll search if there's any tests to this functionality, make a manual test here and send the PR.

cirojr avatar Oct 14 '18 18:10 cirojr

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

github-actions[bot] avatar Oct 21 '25 02:10 github-actions[bot]

This issue will now be closed since it has been labeled 'stale' without activity for 30 days.

github-actions[bot] avatar Nov 20 '25 02:11 github-actions[bot]