Does Anyone Know This Error? React-Native - react-native

I am developing React-Native Android application. I get this line when debugging. I wonder why ?
Nobody answers. Two days passed. Help me
React-native Android Debugger Error Code 712 and 303
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to packager",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "attach"
},
{
"command": "npm start",
"name": "Run npm start",
"request": "launch",
"type": "node-terminal"
},
{
"name": "Debug macOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "macos"
},
{
"name": "Debug Android",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "android"
},
]
}

Related

Define vscode variables

Is there a way to define variables in vscode for use in launch.json?, I only want some variable that will be common to different configurations, let's say TESTING_USER="ABC"
{
"version": "0.2.0",
// it would be ideal to set it here somehow,
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Node",
"runtimeArgs": ["idUser", "${TESTING_USER}"],
},
{
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://localhost:3000?${TESTING_USER}",
}
],
}
The only solution I've found would be creating an entry in settings.json and then referring it with ${config:xxxx} but I wonder if there's a more direct way.
You can use the extension Command Variable and use a file with key-value pairs
Another possibility is to use the command: extension.commandvariable.transform
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Node",
"runtimeArgs": ["idUser", "${input:TESTING_USER}"],
},
{
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://localhost:3000?${input:TESTING_USER}",
}
],
"inputs": [
{
"id": "TESTING_USER",
"type": "command",
"command": "extension.commandvariable.transform",
"args": { "text": "ABC" }
}
]
}

Can't run or debug react native

I am using Visual Code, and just created an react native app through create-react-app NewTest
I already installed React Native Tools in vscode
The app is running just fine in my android device through Expo installed on it. The problem is that I can't run it on my simulator which is genymotion mobile
I get this error:
[Error] Error: Unknown error: not all success patterns were matched
My launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug in Exponent",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "exponent",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}
I just started the getting started tutorial and I have no idea about why it is not working. I already search over the internet and could not find much help.
Genymotion device
Error image

Debug React Native app on iPhone with VSCode

I have VSCode installed on Ubuntu with React Native Tools 0.4.1 installed. I can't figure out how to use debug with it. Tried to follow this tutorial with no luck - it just stacks on loading and nothing happens.
My launch.json is created automatically and looks like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "iPhone 5s",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug in Exponent",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "exponent",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}

Launching Chrome without web-securities in VS Code

How can I configure the Chrome Browser without web-security in launch.json file in VS Code? I installed the VS Code extension Debugger for Chrome and my launch.json seems so:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8100/",
"webRoot": "${workspaceRoot}"
}
]
}
This code launch Chrome with web-securities. How can I configure this file so that I can launch Chrome with this parameter: chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
just add
"runtimeArgs": [
"--disable-web-security"
],
So your launch.json will look like:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8100/",
"runtimeArgs": [
"--disable-web-security"
],
"webRoot": "${workspaceRoot}"
}
]
}

Debugging nwjs app in VSCode

I am using VSCode as my primary JS ide and currently working on a NWJS(node-webkit) app. I want use the debugger available in VSCode. Can anyone guide me through how the launchjs should look like.
Can you please try to below lauch.json. it is working for me.
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/camera/app.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
]
}