Currently I have the following:
My issue though is that when I try to do a compare, Visual Studio Code just opens both revisions in two separate tabs, not in a diff view. Is there a way I can set this up so that when the revisions are opened they're automatically opened in vscode's file comparison view?
Asked
Active
Viewed 2,151 times
1

MrDuk
- 16,578
- 18
- 74
- 133
2 Answers
2
According to the VSCode documentation:
https://code.visualstudio.com/docs/editor/command-line
you want your argument list to be -d %1 %2

Samwise
- 68,105
- 3
- 30
- 44
-
Doesn't seem to work for me. I'm on a Mac if that matters. Is there a way to enable debug output to see the command p4 is calling when I try to diff? – MrDuk Mar 13 '19 at 16:49
-
Are you using the Mac command-line launcher described here? https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line – Samwise Mar 13 '19 at 18:10
-
No, I'm launching it the same as the screenshot above, just with the added `-d`. I have vscode in my path (when I open a terminal I can type `code` to launch it fine), but nothing happens when I try to diff from perforce. – MrDuk Mar 13 '19 at 18:46
-
1The way you're launching it probably doesn't support the `-d` command line flag. Make sure your custom tool is invoking the `code` executable rather than the app bundle or whatever the Mac thing is. :) – Samwise Mar 13 '19 at 18:54
0
I guess it's kind of late to answer this thread but I use /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
as the location and it works.

CenaWang
- 91
- 7