Code was not found on your path
If you are reporting an issue/bug please fill in your VSCode version, CodeSync version, and if you are on version 2.4.0 and above the CodeSync log from the CodeSync output channel. Thanks!
If you are requesting a feature feel free to clear this template.
VSCode version:
CodeSync version:
CodeSync log:
Issue:

Our company uses a customized version of vscode and has a different command, so instead of code, we have other variant, for example codeabcdefg.
Can we make this configurable as a setting?
Thanks!
Does the customized version use different paths for the extensions directory, settings directory, etc?
Unfortunately yes, since the application's name is also different.
For example my settings's path is
$HOME/Library/Application Support/[VSCODE CUSTOM APPLICATION NAME THAT CONTAINS THREE SPACES]/User/settings.json
But other than application name, I don't find anything else different.
Hi, sorry to chase on this.
Is there any relevant code pointer? I can try figuring out how to add this.
Sorry it took me a while to get to this, I just published 2.7.0 which lets you set the VSCode executable name and the VSCode user settings path. The new commands are
CodeSync: Set VSCode executable name
CodeSync: Set VSCode settings path
Update to the latest version and let me know if it works.
Thank you for adding the support so fast!
Sorry it didn't work right out of the gate.
When I reinstall the extension, I saw this in my console:
Activating extension 'golf1052.code-sync' failed: ENOENT: no such file or directory, open '/Users/username/.custom-vscode-path/extensions/golf1052.code-sync-2.7.0/settings.json'.
_logMessageInConsole @ workbench.desktop.main.js:202855
Then I went there and checked that the settings.json indeed doesn't exist.
Then I touched a empty "{}" file named settings.json there.
After Reload Window I see this:
Extension Host
workbench.desktop.main.js:221932 /bin/sh: code: command not found
I think this is the usual, expected message.
Then I use Command Pellate to do setexecutable
Then in console:
workbench.desktop.main.js:152357 Command 'CodeSync: Set VSCode executable name' resulted in an error (command 'codeSync.setCodeExecutableName' not found)
onDidChangeNotification @ workbench.desktop.main.js:152357
(anonymous) @ workbench.desktop.main.js:152345
fire @ workbench.desktop.main.js:5723
addNotification @ workbench.desktop.main.js:154368
error @ workbench.desktop.main.js:221152
accept @ workbench.desktop.main.js:142022
processTicksAndRejections @ internal/process/task_queues.js:85
async function (async)
accept @ workbench.desktop.main.js:142018
(anonymous) @ workbench.desktop.main.js:96532
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68168
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68603
Not entirely sure what went wrong.
Should I seed settings.json with some default params?
Thanks!
Yep after deploying I also ran into this bug, I'm just testing the fix now. 2.7.1 should be available shortly.
2.7.1 is now released. try that.
In my 2.7.1 folder I have a empty settings.json file. I didn't create it so I assume it comes with the install.
But in console I saw:
Activating extension 'golf1052.code-sync' failed: The "path" argument must be of type string. Received type undefined.
_logMessageInConsole | @ | workbench.desktop.main.js:202855
Then I went to settings.json and manually added a
"path": "/usr/local/bin/custom_path"
that didn't help. :(
Still got:
Command 'CodeSync: Set VSCode executable name' resulted in an error (command 'codeSync.setCodeExecutableName' not found)
onDidChangeNotification @ workbench.desktop.main.js:152357
(anonymous) @ workbench.desktop.main.js:152345
fire @ workbench.desktop.main.js:5723
addNotification @ workbench.desktop.main.js:154368
error @ workbench.desktop.main.js:221152
accept @ workbench.desktop.main.js:142022
processTicksAndRejections @ internal/process/task_queues.js:85
async function (async)
accept @ workbench.desktop.main.js:142018
(anonymous) @ workbench.desktop.main.js:96532
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68168
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68603
Can you try exiting VSCode, deleting the settings.json file, and then launching VSCode again?
Thank you!
after delete settings and restart, it now prompts me to enter path and enter executableName
However after all is done. I saw one file in my sync folder: extensions.json
- Invoking other Export keybindings/settings, does not incur any error, but nor does it produce any new files under sync folder.
- Add installed extension exclusion works: add exclude, click Export All, the extension will disappear from extensions.json
Do I need to anything extra to make keybindings and settings work?
Can you paste your CodeSync logs here? They are available in the Output view (View > Output > CodeSync)
Oh this is helpful:
2020-05-17T19:52:34.164Z - Exporting settings.
2020-05-17T19:52:34.164Z - Could not find settings path at /Users/abc/Library/Application Support/Code/User/settings.json. Giving up.
2020-05-17T19:52:34.164Z - Could not find keybindings path at /Users/abc/Library/Application Support/Code/User/keybindings.json. Giving up.
2020-05-17T19:52:34.165Z - Could not find snippets path at /Users/abc/Library/Application Support/Code/User/snippets/. Giving up.
2020-05-17T19:52:34.165Z - Exporting extensions
2020-05-17T19:52:34.166Z - Finished exporting extensions
The actual path to settings is:
/Users/abc/Library/Application Support/[some_other_name]/User/settings.json
For some reason it can output extensions.json maybe this is clil supported?
God this is messy. Thanks so much for helping.
Yes if extensions.json is being created that means the CLI path was found. Once you manually set the VSCode settings path for CodeSync whenever you try and export settings this log line should appear in the CodeSync logs.
Using user defined settings path: [whatever your path is]
My god what are these people thinking.
The custom path contains special characters like '/Users/abc/Library/Application Support/VS Code @ My Wonderful Company/User/` And I believe this might be causing problems:
2020-05-17T23:02:47.487Z - Exporting settings.
helpers.ts
2020-05-17T23:02:47.487Z - Using user defined settings path: /Users/abc/Library/Application Support/VS Code @ My Wonderful Company/User/
And then this:

Command 'CodeSync: Export all' resulted in an error (Unexpected token })
onDidChangeNotification @ workbench.desktop.main.js:152357
(anonymous) @ workbench.desktop.main.js:152345
fire @ workbench.desktop.main.js:5723
addNotification @ workbench.desktop.main.js:154368
error @ workbench.desktop.main.js:221152
accept @ workbench.desktop.main.js:142022
processTicksAndRejections @ internal/process/task_queues.js:85
async function (async)
accept @ workbench.desktop.main.js:142018
(anonymous) @ workbench.desktop.main.js:96532
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68168
fire @ workbench.desktop.main.js:5723
(anonymous) @ workbench.desktop.main.js:68603
Thank you.
What OS are you on? I tried this in Linux and I am not getting this error.
@golf1052 Just regular MacOS.
I'm total noob with js but this error, is it inside the extension or is it inside the vscode's code?
This is a VSCode error, the problem with nailing down where this error is, is that VSCode can't output the stacktrace of extensions.
ah any way I can help debug this?
My settings file contains comment in the form of "// comments", not sure if this is interfering with anything.
If you're able to setup the extension locally you should be able to get a stack trace while debugging. That would be very helpful.
okey finally got to it and here's where it's complaining:
workbench.desktop.main.js:153286 Command 'CodeSync: Export all' resulted in an error (Unexpected token })
| onDidChangeNotification | @ | workbench.desktop.main.js:153286
-- | -- | -- | --
| (anonymous) | @ | workbench.desktop.main.js:153274
| fire | @ | workbench.desktop.main.js:5429
| addNotification | @ | workbench.desktop.main.js:155321
| error | @ | workbench.desktop.main.js:224546
| accept | @ | workbench.desktop.main.js:143039
| processTicksAndRejections | @ | internal/process/task_queues.js:85
| async function (async) | |
| accept | @ | workbench.desktop.main.js:143035
| (anonymous) | @ | workbench.desktop.main.js:97260
| fire | @ | workbench.desktop.main.js:5429
| (anonymous) | @ | workbench.desktop.main.js:68626
| fire | @ | workbench.desktop.main.js:5429
| (anonymous) | @ | workbench.desktop.main.js:69076