firefox-devtools / firefox-devtools/vscode-firefox-debug

Debugging remote CRA applications not working (Remote: Linux/Local:MacOSX)

Open
#244 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
447
Forks
76
PR merge metrics
No merged PRs in 30d

Description

When debugging a remote (Linux) `create-react-app` project, vscode successfully launches a local (OSX) instance of Firefox (two windows actually: one opening up to `http://localhost:3000` and another window opened to a blank page but this is likely due to the `yarn: start` task defaulting to launching a browser of its own?). However, any interactive feature/breakpoints that this plugin enables in vscode does not work.

```json
{
"version": "0.2.0",
"configurations": [
{
"type": "firefox",
"request": "launch",
"firefoxExecutable": "developer",
"firefoxArgs": [
"--start-debugger-server",
],
"profile": "dev-edition-default",
"preLaunchTask": "yarn: start",
"name": "Launch localhost",
"enableCRAWorkaround": true,
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"log": {
"fileName": "${workspaceFolder}/vscode-firefox-debug.log",
"fileLevel": {
"default": "Debug"
},
"consoleLevel": {
"default": "Warn"
}
}
},
{
"name": "Attach",
"type": "firefox",
"request": "attach",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"enableCRAWorkaround": true
},
]
}
```
_Note:_ The `log` parameter does not work as it gives me the following error: `The debug adapter can't write a log file in a remote workspace.` Should I file a separate issue for this?

The settings on the local (OSX) instance of firefox as gleaned from `about:config`
`devtools.debugger.remote-enabled:` `true`
`devtools.chrome.enabled`: `true`
`devtools.debugger.prompt-connection`: `false`
`devtools.debugger.force-local`: `false` <--- I have attempted both `false` and `true`

Am I missing something?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied `launch` and `attach` configurations for the remote Linux and local macOS setup, including the `yarn: start` task. Investigate why breakpoints and interactive features do not work and separately verify the reported remote-workspace log error; done means remote CRA debugging works as described or the missing configuration is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.