My original problem was that the pio command couldn't be found when I clicked the "Platform IO: Serial Monitor" or "Platform IO: New Terminal" buttons.
I investigated a bit, but my findings confuse me.
So I replaced this block with:
console.log(process.env.PATH);
console.log(constants.IS_WINDOWS);
if (constants.IS_WINDOWS) {
commands.push('set PATH=' + process.env.PATH);
} else if (process.env.SHELL && process.env.SHELL.includes('fish')) {
commands.push('set -gx PATH ' + process.env.PATH.replace(/\:/g, ' '));
} else {
commands.push('export PATH=' + process.env.PATH);
}
commands.push('blah');
commands.push('set FOO=BAR');
commands.push('set PATH=' + process.env.PATH);
commands.push('echo %FOO%');
commands.push('set FOO=BAR');
commands.push('echo %FOO%');
commands.push('echo %PATH%');
commands.push('pio --help');
Here's the console output:
[Extension Host]
C:\Users\andre\.platformio\penv\Scripts;C:\Windows\SYSTEM32;C:\Windows\SYSTEM32;C:\Windows;C:\Windows\SYSTEM32
extensionHost.ts:285
[Extension Host]
true
extensionHost.ts:285
And here's the terminal output:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\dev-projects\#Arduino\vscodetest>echo %FOO%
%FOO%
C:\dev-projects\#Arduino\vscodetest>set FOO=BAR
C:\dev-projects\#Arduino\vscodetest>echo %FOO%
BAR
C:\dev-projects\#Arduino\vscodetest>echo %PATH%
C:\Windows\SYSTEM32;C:\Windows
C:\dev-projects\#Arduino\vscodetest>pio --help
Der Befehl "pio" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
C:\dev-projects\#Arduino\vscodetest>
C:\dev-projects\#Arduino\vscodetest>
My original problem was that the
piocommand couldn't be found when I clicked the "Platform IO: Serial Monitor" or "Platform IO: New Terminal" buttons.I investigated a bit, but my findings confuse me.
So I replaced this block with:
Here's the console output:
And here's the terminal output: