My PATH variable (in the compiler shell shown by echo $PATH or set) has a total length of 3305 characters. It contains 77 entries, of which 40 are unique (this was the number I mentioned). 37 entries are duplicates.
The PATH in the Windows environment variables settings has only 5 entries, which are part of the 40 entries in the compiler shell path. This is where I added C:\Users\N\.particle\toolchains\buildtools\1.1.1\bin to fix this issue.
Updating VSCode to 1.49.0 did not help. I don’t have another Windows machine here for comparing.
As VSCode with the Particle extensions are working on other Windows 10 2004 machines, this seems to be an individual problem with my installation. I think I have to reinstall VSCode, Particle drivers or ultimately windows.
But as the workaround with the addition to the Windows path is working fine and permanently across reboots, I think this is a valid solution for now.
I added C:\Users\N\.particle\toolchains\buildtools\1.1.1\bin to fix this issue.
while this might unblock you short-term, it's not a long-term solution as we update the dependency from time to time (iow, the 1.1.1 (version) part of the path will change in the future).
I think I have to reinstall VSCode, Particle drivers or ultimately windows.
just to save you some effort, reinstalling - especially windows itself - will almost certainly not help.
i'm curious if you were running cygwin (or had it installed) prior to using Workbench?
under the hood, Workbench uses VSCode's extension APIs (docs: 1, 2, 3) to spawn a terminal instance using cygwin's bash with a number of environment variables (PATH, PARTICLE_MAKEFILE, etc) preconfigured based on your project's configuration. it's basically:
i'm not sure what would cause the behavior you are seeing where apparently PATH (and perhaps other environment variables) are not being set properly. i might open an issue over in the VSCode repo to see if they have any ideas - GitHub - microsoft/vscode: Visual Studio Code
either way, thanks for the report and apologies for the bumps
I understand, so I will continue using the old path after an update, or it stops working again if the old path is removed.
Ok, but don't you think there is a conflict with something that happened specifically on my machine at some point in the past?
I am not sure about this. I used cygwin a very long time ago, but I can not remember if it was my current (using since 2 years) or the last machine. But I can say for sure that I did not use cygwin ever since Particle Workbench has been released. cygwin is installed on my machine right now (startmenu entry).
Thank you again for the help! If you want to continue searching for the issue, I will provide the information you need, but I think I have to too little knowledge about the build plugins to open an issue at VSCode myself.
don’t you think there is a conflict with something that happened specifically on my machine at some point in the past?
yes, but it's sort of overkill in that the issue almost certainly comes down to a weird configuration or conflicting software like...
cygwin is installed on my machine right now (startmenu entry).
Workbench doesn't actually run the cygwin installer - it just drops the required subset of tools into the ~\.particle\toolchains\buildtools directory and references them as needed.
Maybe try running the uninstaller for cygwin (should be in that start menu entry somewhere) and see if things improve.
If you want to continue searching for the issue, I will provide the information you need,
thank you
but I think I have to too little knowledge about the build plugins to open an issue at VSCode myself.
There is no uninstall entry
and in "Apps & Features" in the system settings there is also no entry for cygwin, thus I can't uninstall it. cygwin is located in C:\cygwin64
Setting my Windows PATH to include
C:\Users\ianda.particle\toolchains\buildtools\1.1.1\bin worked for me too as I simply do not have the time to investigate any further and have code to issue.
Perhaps the onus should be on Particle devs to investigate why their tools break?
update: thanks to @nils for helping me troubleshoot, we were able to confirm that the issue is being caused by a conflict between the PlatformIO extension and Workbench. it seems they released an update recently (September 10th) that likely introduced this issue. from what i’ve heard, prior versions worked fine alongside Particle Workbench.
short-term, the fix is to disable the PlatformIO extension and close + reopen VSCode.
i’ll try to diagnose the underlying problem and work with the PlatformIO and VSCode teams to get some sort of fix in place.
I reported the issue on September 11th, it stopped working for me exactly this day. Very likely the PlatformIO update got installed after starting VSCode on this day.
I also installed the Windows update on the same day, but this seems to be just coincidence.
Thank you @m_m for troubleshooting this and making the PlatformIO team aware of the issue!
When I try to compile my project I get this error:
The terminal process “C:\Users\lawson.particle\toolchains\buildtools\1.1.1\bin\bash.exe ‘-c’, ‘make -f ‘C:\Users\lawson.particle\toolchains\buildscripts\1.9.2\Makefile’ compile-user’” failed to launch (exit code: 3221225781).
when I try this suggestion Particle: Launch Compiler Shell command, I get the same message
The terminal process “C:\Users\lawson.particle\toolchains\buildtools\1.1.1\bin\bash.exe ‘–noprofile’, ‘–norc’” failed to launch (exit code: 3221225781).
I started first with the editing of the PATH, but nothing has worked. It has been a few week since I used the IDE, so I uninstalled & re-installed it also.
The most telling part of that output looks like (exit code: 3221225781). Luckily, many people have encountered this issue. Apparently, it is due to a missing DLL.
Could you try running vc_redist.x64.exe as this user did?
I tried to just run bash.exe from the directory & got an error about not finding cygwin1.dll
OK’ing that dialog got me another error cygiconv-2.dll not found.
Are you sure you had your "Programs and Features" sorted by name?
If it is complaining about "Microsoft Visual C++ 2015 Redistributable (x64)" (not "Studio" in this name) being installed already we should be able to see it in your list somewhere above "Microsoft Visual Studio ..."
However, with the current version of VS Code you should try to install `Microsoft Visual C++ 2017 Redistributable (x64)" (providing you are running a 64 bit Windows - otherwise you may want to opt for 32 bit across the board.
But to get official help for Particle Workbench can you follow the steps in this thread
@m_m and team will then have the data they need to properly assist.
I have a slew of MS Visual C++ Redistributions. 2005 , 2008, 2010, 2012, 2013, 2015-2019, and 2017. The 2015-2019 and 2017 have todays install date, and the rest are over a year old.
I also have MS Visual Studio 2005 Remote Debugger, Visual Studio 2005 Tools for Applications, Visual Studio 2010 Service Pack 1, Visual Studio Tools for Office Runtime, Visual Studio Code(User), and Visual Studio Tools for Applications.
I’ve been trying several fixes, and I always get the same error inside Particle’s Visual Studio
The terminal process “C:\Users\lawson.particle\toolchains\buildtools\1.1.1\bin\bash.exe ‘-c’, ‘make -f ‘C:\Users\lawson.particle\toolchains\buildscripts\1.9.2\Makefile’ compile-user’” failed to launch (exit code: 3221225781).
If I open a terminal and cd to *C:\Users\lawson.particle\toolchains\buildtools\1.1.1\bin* and run bash I get “code execution cannot proceed because cygwin1.dll was not found.” Followed by “cygreadline7.dll was not found.” Followed by “cygiconv-2.dll was not found.” Then back to “cygwin1.dll was not found.” Finally the dialogs stop
However, if I am not in the C**:\Users\lawson.particle\toolchains\buildtools\1.1.1\bin** directory, bash runs fine.