• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Application Missing From VS Code Evaluation List

Community Expert ,
Jun 19, 2023 Jun 19, 2023

Copy link to clipboard

Copied

Hi All, I’ve run into a problem with Visual Studio Code not seeing all of my installed Adobe apps. If I click Eval in Adobe... the application list doesn’t show Photoshop CC2020—it does show PS CC2019 and CC2021:

 

Screen Shot 26.png

 

I would try reinstalling CC2020, but that’s no longer possible. Anyone know how VS Code gets the list of Adobe apps?

TOPICS
Scripting

Views

840

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2023 Jun 19, 2023

Copy link to clipboard

Copied

You can [try] to get 2020 if you contact support via the online chat. As long as you have a decent reason, you should be able to get a link. I was able to get the software for training purposes.

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 19, 2023 Jun 19, 2023

Copy link to clipboard

Copied

What happens if you $.writeln from a script launched within the application?

That sometimes helped ESTK to see an InDesign Server ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

Hi Dirk, just to clarify it’s only Photoshop CC2020 that’s missing from the evaluation list in Visual Studio Code (I’m not using the ESTK application). If I run a $.writeln from VS Code with PS 2020 running I get this:

 

Screen Shot 27.png

If I run the same code from Photoshop’s Scripts menu, it launches the ESTK application and nothing happens. If I run a script directly from PS2020 that has no $.writeln requests, the script runs as expected.

 

When I try to get the PSCC2020 installer via Adobe’s chat as David @Creamer Training 

{Modified by MOD}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

I'm not sure why the PS2020 would not show up in the list of installed applications. That is strange. To debug that, you might need to go into the SQLite databases where the host applications install their information to verify that they exist as expected. That's simply how the list of installed applications is discovered.

 

quote

If I run the same code from Photoshop’s Scripts menu, it launches the ESTK application and nothing happens. If I run a script directly from PS2020 that has no $.writeln requests, the script runs as expected.

 

To be clear, when you're trying to run things from VS Code, you haven't also opened ESTK at some point, correct? If so, you will need to restart Photoshop and try again. This is because all host ExtendScript engines are hard-coded to see the ESTK debugger and then disallow connections to any other debugger. I think this is actually a bug in the initial design but it never manifested because ESTK was the only debugger for a very long time. The v1 VS Code extension lied about its identity and claimed to be ESTK 4.0. That was one of the reasons that you couldn't open ESTK and have VS Code open at the same time (with the v1 extension installed) - BridgeTalk identifier collision. The v2 VS Code extension uses its own custom BridgeTalk identifier and makes use of the instance portion of the identifier to enable multi-window support (you can have two separate VS Code windows debugging two separate applications at the same time).

 

At any rate, it is odd that you are unable to connect to Photoshop 2020. Please try the following:

 

  1. Close VS Code, Photoshop, and ESTK.
  2. Start Photoshop.
  3. Start VS Code.
  4. Attempt to run the script.

 

If that doesn't work, please answer the following questions:

 

  1. What is your process for evaluating scripts from VS Code?
  2. If you are specifying a custom host application specifier to make the connection to Photoshop 2022, what is the precise specifier that you are using?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

you might need to go into the SQLite databases where the host applications install their information to verify that they exist as expected.

 

I was thinking the same but I don‘t know how to find that DB—I’m assuming it would be part of the VSCode ESTK extension?

 

Please try the following:

 

With PS CC2020 running I get this:

Screen Shot 38.png

 

If I close CC2020 and open CC2021 the script runs and returns Adobe Photoshop.

 

Also, where it becomes more of a problem is when I run an InDesign script with a BridgeTalk object when Photoshop 2020 is running. I get this when PS CC2020 is running:

 

Screen Shot 39.png

 

But when PS CC2021 is running there’s no error—alert("Photoshop Running") shows:

 

Screen Shot 40.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

quote

I was thinking the same but I don‘t know how to find that DB—I’m assuming it would be part of the VSCode ESTK extension?


By @rob day

 

It is not part of the VS Code ExtendScript Debugger extension, no. At this point it is effectively managed by the Creative Cloud desktop application (the thing you use to manage applications). I actually do not recall exactly where the database is installed - on macOS it's in the Library somewhere under Application Support, I believe. Also, it might actually be multiple DBs at this point.

 

quote

If I close CC2020 and open CC2021 the script runs and returns Adobe Photoshop.


By @rob day

 

That is not surprising - the identifier you're using (photoshop) is entirely ambiguous. I will address this further in a response to your other message below.

 

quote

Also, where it becomes more of a problem is when I run an InDesign script with a BridgeTalk object when Photoshop 2020 is running. I get this when PS CC2020 is running:

 

Screen Shot 39.png

 

But when PS CC2021 is running there’s no error—alert("Photoshop Running") shows:

 

Screen Shot 40.png


By @rob day

 

Yup, that's not entirely surprising or wholly unexpected. Again, the "target identifier" you're using is ambiguous. More below.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

My Photoshop launch.json is

 

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Main", 
      "type": "extendscript-debug",
      "request": "launch",
      "hostAppSpecifier": "photoshop",
      "engineName": "main",
    }
  ]
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

quote

My Photoshop launch.json is

 

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Main", 
      "type": "extendscript-debug",
      "request": "launch",
      "hostAppSpecifier": "photoshop",
      "engineName": "main",
    }
  ]
}

 

Fantastic. Thank you for providing this! As I mentioned to above your "hostAppSpecifier" field (the BridgeTalk "target" or Application Specifier) is ambiguous. Technically "photoshop" can refer to every version of Photoshop that you have installed. I believe that by default it attempts to refer to the installation with the highest version, but I could be wrong.

 

In general, best practice if you are working with multiple installations of a host application at the same time (as you are in your instance) would be to ensure that you include the version number. Those are actually shown in the list presented by VS Code:

 

sberic_0-1687290266106.png

 

As you can see above, Photoshop 2021 is actually "photoshop-150.064". As the version number attached to CC 2019 is 130.064, Photoshop 2020 would be 140.064. As such, I would recommend that you try using the following Launch Configuration:

 

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch Main - Photoshop (latest)",
      "type": "extendscript-debug",
      "request": "launch",
      "hostAppSpecifier": "photoshop",
      "engineName": "main",
    },
    {
      "name": "Launch Main - Photoshop 2020",
      "type": "extendscript-debug",
      "request": "launch",
      "hostAppSpecifier": "photoshop-140.064",
      "engineName": "main",
    }
  ]
}

 

This will provide you with two launch options:

 

  1. Launch Main - Photoshop (latest) - This will start a debug session in the latest version of Photoshop installed on the computer. As it is a Launch-mode session, the debug session will end as soon as the script completes processing.
  2. Launch Main - Photoshop 2020 - This will start a debug session in Photoshop 2020. As it is a Launch-mode session, the debug session will end as soon as the script completes processing.

 

As I'm sure you're aware, the Photoshop in question will need to be running when starting either of the above debug sessions.

 

As for why Photoshop 2020 isn't showing up in the VS Code extension's found target list, the only thing I can think of here is that something unfortunate happened during the Photoshop 2020 installation process that resulted in the application not properly registering itself with the necessary detabases. Reinstallation of Photoshop 2020 might fix it, if that's something you can work out with Adobe themselves.

 

Either way, please give the above launch configurations a shot!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

I would recommend that you try using the following Launch Configuration:

 

Still doesn’t work, same error message.

 

This also doesn’t work from InDesign where I’m specifing photoshop 140.064

 

 

//InDesign as the script application
//#target indesign
#targetengine "session" 

runPhotoshop();

/**
* Opens Photoshop via Bridgetalk and runs psScript 
*  value void
* 
*/
function runPhotoshop(){
    //open Photoshop and run psScript
    var bt = new BridgeTalk();  

    //checks for Photoshop CC2020, and if not available opens a fallback:
    //If a specifier does not supply specific version and locale information, the framework tries to find the most appropriate available installation. It tries to match to available applications in this order:


    var phtshp = BridgeTalk.getSpecifier( "photoshop-140.064");
    if( !phtshp ) {
        phtshp = "photoshop"
    }
    bt.target = phtshp
      
    bt.body = "var func = " + psScript.toString() + "func();";

    bt.onResult = function(resObj) { 
        alert(resObj.body);
    }  
    bt.onError = function( inBT ) { alert(inBT.body); };  
    bt.send(8);  
      
    function psScript() {  
        var doc = app.documents.add();
        //app.bringToFront();
        alert("Photoshop Running")
        return "Done"
    }  
}

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

You're running this from within InDesign itself, yes? The VS Code extension isn't involved at all?

 

Either way, I'm sure you've attempted to run that script with Photoshop 2021 open and the relevant specifier value (photoshop-150.064), yeah? And that did work as you expected?

 

If so then this sounds like a broken installation wherein Photoshop 2020 either didn't properly register itself when installed or some other thing came in later and broke it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

Currently I’m running OSX Mojave, so for the time being I can’t install beyond CC2021. For general Photoshop work I prefer CC2020 over CC2021, so the simplest solution is to reinstall PS CC2021 along with CC2020 and use CC2021 for debugging code. Not ideal, but it works. Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

Hi Rob,

could you run BridgeTalk diagnostics from VS Code using e.g. InDesign?

BridgeTalk.__diagnostics__;

 

That should get you an InDesign document with a text frame showing the results:

 

// ExtendScript for InDesign

var results = BridgeTalk.__diagnostics__;
var resultDoc = app.documents.add();
resultDoc.textFrames.add
(
	{ 
		geometricBounds : [ 0,0,"250mm","200mm"] , 
		contents : results 
	}
);

 

Could you see this as part of the results?

/*
photoshop-140.064: 
	Path = /Applications/Adobe Photoshop 2020/Adobe Photoshop 2020.app
	Display Name = Adobe Photoshop 2020
	MsgAuthentication = ON
	MsgDigest = ON
	ESTK = ON
	BundleID = com.adobe.Photoshop
	Status = (not running)
	ExeName = Adobe Photoshop 2020.app

*/

 

BridgeTalkDiagnostics-photoshop-140.064.png

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

Hi Uwe, I’ve attached the result text—Bridgetalk can’t find PS CC2020 even though it is running.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

Hi Rob,

you could also try the following:

Sign out from the Adobe Creative Cloud Desktop App.

Restart your machine.

Sign in to the Adobe Creative Cloud Desktop App.

 

After doing this, the CC Desktop App should check for all installed apps.

If you are lucky PhotoShop 2020 will be registered again.

Maybe that will update the BridgeTalk connections...

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

Good Idea, but it didn’t work.

 

The odd thing is I have a clone of my startup drive from a year ago that has CC2020 and not CC2021 installed, and if I startup from that drive, VS Code lists PS CC2020 in the evaluation list. It does seem like there is something wrong with whatever database VS Code gets the app list from. Don’t know where to begin looking for that. Luckily leaving both 2020 and 2021 in my Applications folder works—I just have to pay attention to which version is running.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied


@rob day wrote:

It does seem like there is something wrong with whatever database VS Code gets the app list from. Don’t know where to begin looking for that.

 

To be clear, VS Code gets its list from BridgeTalk itself (via code within the adobe_caps.dll which is included with the extension and is the reason that there is no Apple Silicon version). At the risk of angering the gods, I would point you to the domain_data table in this file:

 

  • /Library/Application Support/Adobe/Adobe PCD/pcd.db

 

I do not pretend to understand the Schema, nor what might minimally constitute "an entry", but it certainly looks promising. Good luck on your spelunking adventure.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2023 Jun 21, 2023

Copy link to clipboard

Copied

LATEST

Looks promising, but PS 140.064 is in the list:

 

Screen Shot 2.png

 

There is a cache folder in the same directory and if I move that out of the Adobe PCD folder, VS Code doesn’t see any applications. If the dual installation wasn’t working I might try messing with that file, but I think I’ll leave it alone for now. Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines