Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.

0 votes

Comments

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.

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

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

 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?

0 votes

Comments

It still doesn't work for me :(


Thank you for the suggestion though! 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019

Question asked: Jul 22 '20, 2:25 p.m.

Question was seen: 2,241 times

Last updated: Dec 08 '20, 12:17 p.m.

Confirmation Cancel Confirm