Closed cilliemalan closed 3 years ago
Makes sense. We are using Windows style paths on Windows by default because most users will stick to cmd.exe and Powershell.exe terminals. WSL users are actually running on a Linux machine.
In the meantime If you want to use MSYS bash you can modify your extension configuration settings with forward slashes.
We'll think of how to support this in the extension.
You can probably fix it by using vscode.ProcessExecution
instead of vscode.ShellExecution
const pythonBinPath = idfConf.readParameter("idf.pythonBinPath") as string;
- return new vscode.ShellExecution(
- `${pythonBinPath} ${flasherArgs.join(" ")}`,
- options
- );
+ return new vscode.ProcessExecution(pythonBinPath, flasherArgs, options);
}
The main issue I find about this approach is output formatting.
When tested using Process Execution it seems that output gets truncated which makes output hard to read. Doesn't this happens to you ?
Was just a vscode thing, restarting vscode seems to get it right.
This is what I see when I change it to vscode.ProcessExecution
and I run the ESP-IDF: Flash (UART) your project command:
Pre Bug Report Checklist Before reporting any bug please make sure of these points.
Describe the bug The command "ESP-IDF: Flash (UART) your project" fails. It attempts to run a command with bash but with windows/cmd.exe-style paths.
To Reproduce
/usr/bin/bash: C:Usersblah.espressifpython_envidf4.3_py3.8_envScriptspython.exe: command not found The terminal process "C:\tools\msys64\usr\bin\bash.exe '-c', 'C:\Users\blah.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe c:\tools\esp-idf\components\esptool_py\esptool\esptool.py -p COM28 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 geyser.bin 0x1000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin'" terminated with exit code: 127.
Installing ESP-IDF Debug Adapter python packages in C:/Users/blah/.espressif/python_env/idf4.3_py3.8_env/Scripts/python.exe ...
Ignoring typing: markers 'python_version < "3.5"' don't match your environment Requirement already satisfied: setuptools>=21 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 1)) (57.1.0) Requirement already satisfied: click in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 3)) (8.0.1) Requirement already satisfied: psutil>=5.5.1 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 4)) (5.8.0) Requirement already satisfied: pygdbmi<=0.9.0.2 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 5)) (0.9.0.2) Requirement already satisfied: pywin32>=227 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 6)) (301) Requirement already satisfied: requests>=2.21.0 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 7)) (2.26.0) Requirement already satisfied: xmlrunner>=1.7.7 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from -r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 9)) (1.7.7) Requirement already satisfied: certifi>=2017.4.17 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 7)) (2021.5.30) Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 7)) (2.0.1) Requirement already satisfied: idna<4,>=2.5 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 7)) (3.2) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from requests>=2.21.0->-r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 7)) (1.26.6) Requirement already satisfied: colorama in c:\users\blah.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (from click->-r c:\Users\blah.vscode\extensions\espressif.esp-idf-extension-1.1.1\esp_debug_adapter\requirements.txt (line 3)) (0.4.4) WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available. You should consider upgrading via the 'C:\Users\blah.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.
{"message":"Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:6907\n at ChildProcess.exithandler (child_process.js:308:7)\n at ChildProcess.emit (events.js:315:20)\n at ChildProcess.EventEmitter.emit (domain.js:467:12)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","timestamp":"2021-07-14T10:30:30.972Z"} {"message":"Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:6907\n at ChildProcess.exithandler (child_process.js:308:7)\n at ChildProcess.emit (events.js:315:20)\n at ChildProcess.EventEmitter.emit (domain.js:467:12)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","timestamp":"2021-07-14T10:30:59.022Z"} {"message":"WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.\r\nYou should consider upgrading via the 'C:\Users\blah\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.\r\n","stack":"Error: WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.\r\nYou should consider upgrading via the 'C:\Users\blah\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.\r\n\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:6907\n at ChildProcess.exithandler (child_process.js:308:7)\n at ChildProcess.emit (events.js:315:20)\n at ChildProcess.EventEmitter.emit (domain.js:467:12)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","timestamp":"2021-07-14T10:31:30.970Z"} {"message":"WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.\r\nYou should consider upgrading via the 'C:\Users\blah\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.\r\n","stack":"Error: WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.\r\nYou should consider upgrading via the 'C:\Users\blah\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe -m pip install --upgrade pip' command.\r\n\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:6907\n at ChildProcess.exithandler (child_process.js:308:7)\n at ChildProcess.emit (events.js:315:20)\n at ChildProcess.EventEmitter.emit (domain.js:467:12)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","timestamp":"2021-07-14T10:31:35.066Z"} {"user":true,"message":"Something went wrong while trying to build the project","stack":"Error: Task ESP-IDF Build exited with code 1\n at Function. (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67146)\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65748\n at new Promise ()\n at o (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65493)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67010\n at d.fire (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)\n at w.$onDidEndTaskProcess (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:50791)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:31:50.101Z"}
{"user":true,"message":"Failed to flash because of some unusual error","stack":"Error: Task ESP-IDF Flash exited with code 127\n at Function. (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67146)\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65748\n at new Promise ()\n at o (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65493)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67010\n at d.fire (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)\n at w.$onDidEndTaskProcess (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:50791)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:43:32.474Z"}
{"user":true,"message":"Failed to flash because of some unusual error","stack":"Error: Task ESP-IDF Flash exited with code 127\n at Function. (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67146)\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65748\n at new Promise ()\n at o (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65493)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67010\n at d.fire (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)\n at w.$onDidEndTaskProcess (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:50791)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:45:05.235Z"}
{"user":true,"message":"Failed to flash because of some unusual error","stack":"Error: Task ESP-IDF Flash exited with code 127\n at Function. (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67146)\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65748\n at new Promise ()\n at o (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65493)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67010\n at d.fire (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)\n at w.$onDidEndTaskProcess (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:50791)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:47:25.967Z"}
{"user":true,"message":"Failed to flash because of some unusual error","stack":"Error: Task ESP-IDF Flash exited with code 127\n at Function. (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67146)\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65748\n at new Promise ()\n at o (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:65493)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:67010\n at d.fire (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)\n at w.$onDidEndTaskProcess (c:\Users\blah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:50791)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:50:07.746Z"}
{"message":"Cannot access filePath: ${env:ADF_PATH}","stack":"Error: ENOENT: no such file or directory, access '${env:ADF_PATH}'\n at Object.accessSync (fs.js:220:3)\n at Object.e.accessSync (electron/js2c/asar_bundle.js:5:7989)\n at I (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:4296)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:234928\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:229683\n at new Promise ()\n at l (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:229428)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:234751\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:235831\n at Generator.next ()\n at s (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:233356)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:54:31.367Z"}
{"message":"Cannot access filePath: ${env:MDF_PATH}","stack":"Error: ENOENT: no such file or directory, access '${env:MDF_PATH}'\n at Object.accessSync (fs.js:220:3)\n at Object.e.accessSync (electron/js2c/asar_bundle.js:5:7989)\n at I (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:4296)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:235124\n at Generator.next ()\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:229683\n at new Promise ()\n at l (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:229428)\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:234751\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:235831\n at Generator.next ()\n at s (c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:8:233356)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-07-14T10:54:31.368Z"}
{"message":"Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n at c:\Users\blah\.vscode\extensions\espressif.esp-idf-extension-1.1.1\dist\extension.js:1:6907\n at ChildProcess.exithandler (child_process.js:308:7)\n at ChildProcess.emit (events.js:315:20)\n at ChildProcess.EventEmitter.emit (domain.js:467:12)\n at maybeClose (internal/child_process.js:1048:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)","level":"error","timestamp":"2021-07-14T10:54:32.492Z"}
{"message":"ENOENT: no such file or directory, open 'd:\Projects\yeah\no\.vscode\launch.json'","stack":"Error: ENOENT: no such file or directory, open 'd:\Projects\yeah\no\.vscode\launch.json'","level":"error","timestamp":"2021-07-14T10:54:33.378Z"}
{"user":true,"level":"warn","message":"Extension configuration report has been copied to clipboard with errors","timestamp":"2021-07-14T10:54:33.378Z"}