It's all about the answers!

Ask a question

How do I use Visual Studio code as an external compare tool?


Fullchee Zhang (113) | asked Jul 22 '20, 2:25 p.m.
edited Jul 22 '20, 4:31 p.m.
Here's the local and remote compare arguments that I used
--diff "${file1Path}" "${file2Path}"

It says that it can't find the given file 
C:\Users\ADMINI~1\AppData\Local\Temp\2\RTC__KEuIMxGEeqjcIQjEDE_rA\my-file-name.xml

Investigating, I find that the folder RTC__KE... doesn't exist.
I am on a Windows 2012 server.
I have Eclipse and the RTC plugin.

When I set the external compare tool to Beyond Compare, it works fine.

Comments
Shashikant Padur commented Jul 23 '20, 4:28 a.m.
JAZZ DEVELOPER

I tried this on MacOS and it works for the very first launch of VS code. Next time it  showed and error informing that it cannot open file. If I close VS Code, again it will work for the first launch. I am wondering if there is an issue with VS Code.


Fullchee Zhang commented Jul 23 '20, 10:15 a.m.

It doesn't seem to work for the first launch of VS Code for me.


Kirk Vogen commented Dec 08 '20, 12:15 p.m. | edited Dec 08 '20, 12:17 p.m.

It seems to be working for me. I added the --wait parameter as well. The documentation says: Wait for the files to be closed before returning. It does seem to work without the --wait parameter, though. Here is my Remote Compare Arguments entry:

--wait --diff "${file1Path}" "${file2Path}"
                    

One answer



permanent link
Luis Peregrina (18114) | answered Jul 24 '20, 11:37 a.m.
JAZZ DEVELOPER

 What is happening here is that Eclipse creates temporary files and deletes them when VSCode has finished using them, the problem is that VSCode releases the file too soon, before it's displayed. I think it is an architectural problem with the file watcher used in VSCode. 


Can you try running vscode with parameter "--disable-extensions" and see if that makes a difference?


Comments
Fullchee Zhang commented Jul 24 '20, 11:45 a.m.

It still doesn't work for me :(


Thank you for the suggestion though! 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.