Closed mijewe closed 5 months ago
Thanks for filing this! I'm trying to reproduce this on my end, but have been unable to so far.
Can you confirm that these are the steps that I should follow?
code {path_to_folder}
where {path_to_folder}
is a path to a folder on your system (e.g., code ~/Projects
)Also, can you confirm that you are using the v1.2.0 release?
Finally, can you share the workflow debugging output when you run the workflow and run into this error? Check out this article on how to run the debugger.
I just tried this again and it seems like it will continue worked for a few seconds after the first folder is opened in VSCode, so I can sometimes use the workflow for a second time, but after a few seconds it will stop opening folders. Weird!
So the updated steps are:
code {path_to_folder}
code {path_to_folder_2}
code {path_to_folder_3}
There was no output from this before I added the above try-catch. With the error logging added, it looks like this:
[13:53:35.730] Visual Studio Code[File Filter] Processing complete
[13:53:35.731] Visual Studio Code[File Filter] Passing output '[folder1]' to Run Script
[13:53:54.342] Visual Studio Code[File Filter] Processing complete
[13:53:54.343] Visual Studio Code[File Filter] Passing output '[folder2]' to Run Script
[13:53:54.508] STDERR: Visual Studio Code[Run Script] Visual Studio Code got an error: Application isn’t running.
[13:54:03.040] Visual Studio Code[File Filter] Processing complete
[13:54:03.042] Visual Studio Code[File Filter] Passing output '[folder3]' to Run Script
[13:54:03.207] STDERR: Visual Studio Code[Run Script] Visual Studio Code got an error: Application isn’t running.
Very strange! Unfortunately, I'm still not able to reproduce this on my end.
I did notice that your debugging output states that you are using the Visual Studio Code[File Filter]
action which is linked to the codef
keyword rather than code
. Did you happen to modify the workflow at all?
I've uninstalled and reinstalled the workflow so it's as was.
I'm getting the same issue with both the codef
and code
inputs - VSCode opens the first time, but not on subsequent times.
Adding in the try-catch I get the same "Application isn't running" error message
14:54:09.593] Visual Studio Code[File Filter] Passing output '[folder]' to Run Script
[14:54:09.758] STDERR: Visual Studio Code[Run Script] Visual Studio Code got an error: Application isn’t running.
[14:54:18.624] Visual Studio Code[File Filter] Processing complete
[14:54:18.625] Visual Studio Code[File Filter] Passing output '[folder]' to Run Script
[14:54:18.792] STDERR: Visual Studio Code[Run Script] Visual Studio Code got an error: Application isn’t running.
[14:54:49.658] Visual Studio Code[Keyword] Processing complete
[14:54:49.661] Visual Studio Code[Keyword] Passing output '[filepath]' to Run Script
[14:54:49.838] STDERR: Visual Studio Code[Run Script] Visual Studio Code got an error: Application isn’t running.
and I'm on Alfred 4.6.4
Thanks for your help btw
Unfortunately, I'm still unable to reproduce this. Trying to figure out if there is anything different that I'm doing or if there's something different in our environments.
What version of macOS are you running on and what version of VS Code are you using?
Also trying to rule out an issue with the script or AppleScript itself. What happens if you run the following script in Script Editor.app
?
set theTarget to "{FULL_PATH_TO_FOLDER}"
tell application "Visual Studio Code"
open theTarget
end tell
I reproduce this on my m1 pro mac
@catch6 thanks for confirming this bug. Unfortunately, I am still unable to reproduce this on my various macOS machines. Can you run through some of the questions I asked earlier in this thread?
What version of macOS are you running on and what version of VS Code are you using?
Also trying to rule out an issue with the script or AppleScript itself. What happens if you run the following script in Script Editor.app?
set theTarget to "{FULL_PATH_TO_FOLDER}"
tell application "Visual Studio Code"
open theTarget
end tell
@alexchantastic
set theTarget to "{FULL_PATH_TO_FOLDER}"
tell application "Visual Studio Code"
open theTarget
end tell
in Script Editor.app is working as expected
Fixed in v1.3.0
Since updating to OSX 12.13.1, when I run
code xxx
to open thexxx
folder, if VS Code is already running, it doesn't open a new window.There was no error reported, so I added a try-catch around bit that opens VS Code, so now I have
When I run
code xxx
, I now get the error "Visual Studio Code got an error: Application isn’t running."If I close VS Code, and open a folder using this workflow, it opens successfully.