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

VS Code - $.writeln

Explorer ,
Dec 01, 2022 Dec 01, 2022

Is there a way to print out variable values into the VS Code's variable section or print it to the console? The variable section is always empty and the watch section is always returning 'not available' massage for variables when running a script.

TOPICS
Scripting , SDK
2.3K
Translate
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

correct answers 1 Correct answer

Explorer , Jan 28, 2023 Jan 28, 2023

Justin thank you for your response. I found the solution by using attach mode when running scripts in VS Code

Translate
Community Expert ,
Jan 27, 2023 Jan 27, 2023

Are you on the latest version of the VS Code ExtendScript extension? Variables will only be updated when hitting a breakpoint, but $.writeln() should show up in the terminal.

Translate
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
Explorer ,
Jan 28, 2023 Jan 28, 2023

Justin thank you for your response. I found the solution by using attach mode when running scripts in VS Code

Translate
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 ,
Jan 29, 2023 Jan 29, 2023

Great to hear it's working!

Translate
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
Contributor ,
Oct 25, 2024 Oct 25, 2024

Hi, what exactly did you do?
My configuration looks like this and it doesn't work

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "extendscript-debug",
      "request": "launch",
      "name": "Attach to ExtendScript Engine",
      "program": "${file}",
      "stopOnEntry": false,
    }
  ]
}


 

Translate
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 ,
Oct 25, 2024 Oct 25, 2024

Are you looking in the Debug Console?

Translate
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
Contributor ,
Oct 26, 2024 Oct 26, 2024

Yes, there's nothing there.

Harchenko_1-1729932324847.png

 

Translate
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 ,
Oct 28, 2024 Oct 28, 2024

Is the code actually executing in AE? If you add an alert() will that show up in AE?

Translate
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
Contributor ,
Oct 29, 2024 Oct 29, 2024

Yes, sure.
The code is executed but the Dedug Console is empty

Harchenko_0-1730187398232.png

 

Translate
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 ,
Oct 29, 2024 Oct 29, 2024

Strange, maybe try reinstalling the VS Code extension

Translate
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
Contributor ,
Oct 30, 2024 Oct 30, 2024

I have already done all this, periodically over several years. All I have to do is try to reinstall the system, but I won't do it for the Debug Console))

Translate
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 ,
Oct 30, 2024 Oct 30, 2024

Hmm, does it do it with other apps beside AE? Also have you tried re-installing VS Code?

Translate
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
Contributor ,
Oct 30, 2024 Oct 30, 2024

Doesn't work in AE, PP, PS.

Translate
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
Contributor ,
Oct 30, 2024 Oct 30, 2024

Reinstalling VS Code helped.
Thank you

Translate
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 ,
Oct 30, 2024 Oct 30, 2024

Awesome!

Translate
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
Advocate ,
Oct 30, 2024 Oct 30, 2024

Try this:

screenshot.png

 

 

Translate
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
Contributor ,
Oct 30, 2024 Oct 30, 2024

In my case it doesn't work.

upd.
After reinstalling VS Code works.
Thank you, useful information

Translate
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
Advocate ,
Oct 30, 2024 Oct 30, 2024
LATEST

I don't think so. 🤔

 

Look at your screenshot

screenshot_1.png

 

You probably simply evaluate the script 

 

My window:

screenshot.png

 

 

 

Translate
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