firefox-devtools / firefox-devtools/vscode-firefox-debug
[Help] Couldn't find the Firefox executable. Please correct the path given in your launch configuration.
- Ngôn ngữ chính
- TypeScript
- Star
- 447
- Fork
- 76
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
# Overview of the Problem
I can't get RUN AND DEBUG to work. It says it can't find my firefox executable:
---
## `launch.json` Changes
I've changed my `launch.json` to include `"firefoxExecutable": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe"` in all configurations.
**`launch.json` Content**
```json
{
// Firefox debug configurations for the "Debugger for Firefox" extension
// (firefox-devtools.vscode-firefox-debug).
//
// Pick a configuration from the Run and Debug dropdown, then press F5.
//
// - "Firefox: Current file (file://)" -> debug whatever HTML file is
// currently active in the editor
// - "Firefox: Main test page (file://)" -> debug Chromatic Pro Var.html
// regardless of which file is active
// - "Firefox: Current file via localhost" -> serve the workspace over HTTP
// (npx serve) and debug the active
// HTML file at http://localhost:5500
// - "Firefox: Attach to running Firefox" -> attach to a Firefox instance you
// started yourself with remote
// debugging enabled (port 6000)
"version": "0.2.0",
"configurations": [
{
"name": "Firefox: Current file (file://)",
"type": "firefox",
"request": "launch",
"reAttach": true,
"file": "${file}",
"pathMappings": [
{
"url": "file://${workspaceFolder}",
"path": "${workspaceFolder}"
}
],
"keepProfileChanges": true,
"log": {
"fileName": "${workspaceFolder}/.vscode/firefox-debug.log",
"fileLevel": {
"default": "Warn"
}
},
"firefoxExecutable": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe"
},
{
"name": "Firefox: Main test page (file://)",
"type": "firefox",
"request": "launch",
"reAttach": true,
"file": "${workspaceFolder}/Chromatic Pro Var.html",
"pathMappings": [
{
"url": "file://${workspaceFolder}",
"path": "${workspaceFolder}"
}
],
"keepProfileChanges": true,
"firefoxExecutable": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe"
},
{
"name": "Firefox: Current file via localhost",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost:5500/${fileBasename}",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "serve workspace on :5500",
"postDebugTask": "stop server",
"keepProfileChanges": true,
"firefoxExecutable": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe"
},
{
"name": "Firefox: Attach to running Firefox",
"type": "firefox",
"request": "attach",
"port": 6000,
"host": "localhost",
"firefoxExecutable": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe",
"pathMappings": [
{
"url": "file://${workspaceFolder}",
"path": "${workspaceFolder}"
},
{
"url": "http://localhost:5500",
"path": "${workspaceFolder}"
}
]
}
]
}
```
---
## VS Code Settings Changes
I've changed the following VS Code settings to point to my Firefox path:
- `firefox.executable` (`"C:\Program Files\Firefox Developer Edition\firefox.exe"`)
- `workbench.externalBrowser` (`"C:\Program Files\Firefox Developer Edition\firefox.exe"`)
All of the `"firefoxExecutable"` entries are correct. My system's Firefox installation is at `C:\Program Files\Firefox Developer Edition\firefox.exe`.
---
## Firefox `about:config` Changes
I changed the following values in `about:config` in FF:
- `devtools.debugger.remote-enabled` to `true`
- `devtools.chrome.enabled` to `true`
## Help Request
After all of these edits, I still cannot debug from the "RUN AND DEBUG" window. Still getting the `Couldn't find the Firefox executable. Please correct the path given in your launch configuration.` error.
Can someone explain to me the correct way to configure this plugin so I can debug with FF Dev Edition?
I have no clue why it's not working.
Thank you in advance for any help at all.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với các cấu hình launch.json đã được báo cáo và cài đặt firefox.executable của VS Code, sau đó tái hiện lỗi Run and Debug bằng đường dẫn Firefox Developer Edition trên Windows. Công việc được xem là hoàn tất khi extension chấp nhận tệp thực thi đã cấu hình và khởi chạy hoặc đính kèm vào Firefox mà không gặp lỗi đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100