Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration properties to documentation #1040

Merged
merged 18 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,29 @@ More information about debugging using VS Code can be found in this [guide](http

See [Setting up debug environment](doc/debugging.md) for more details.

## React Native debug configuration properties
Name |Description|Defaults|
|---|---|---|
|`cwd`|The path to project root folder|`${workspaceFolder}`|
|`sourceMaps`|Whether to use JavaScript source maps to map the generated bundled code back to its original sources|`true` if not defined explicitly|
|`sourceMapPathOverrides`|A set of mappings for rewriting the locations of source files from what the source map says, to their locations on disk. See https://github.com/Microsoft/vscode-react-native/blob/master/doc/debugging.md#debugging-with-typescript-and-haul for details|n/a|
|`trace`|Setup logging level in debugger|`log`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`address`|TCP/IP address of debug port|`localhost`|
|`port`|Debug port to attach to|`8081`|
|`remoteRoot`|The source root of the remote host|`null`|
|`localRoot`|The local source root that corresponds to the 'remoteRoot'|`${workspaceFolder}`|
|`skipFiles`|An array of file or folder names, or glob patterns, to skip when debugging|`[]`|
|`debuggerWorkerUrlPath`|Path to the app debugger worker to override. For example, if debugger tries to attach to http://localhost:8081/debugger-ui/debuggerWorker.js and you get 404 error from packager output then you may want to change debuggerWorkerUrlPath to another value suitable for your packager (\"debugger-ui\" will be replaced with the value you provide)|`debugger-ui/`|
|`platform`|The platform to target|n/a|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`target`|Device target to run on (either device or simulator)|`simulator`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`logCatArguments`|Arguments to be used for LogCat (The LogCat output will appear on an Output Channel). It can either be an array such as: [\":S\", \"ReactNative:V\", \"ReactNativeJS:V\"] or a string such as \":S ReactNative:V ReactNativeJS:V\"|`["*:S", "ReactNative:V", "ReactNativeJS:V"]`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`runArguments`|Run arguments to be passed to `react-native run-<platform>` command(Override all other configuration params)|n/a|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`env`|Environment variables passed to the program|`{}`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`envFile`|Absolute path to a file containing environment variable definitions|`${workspaceFolder}/.env`|
|`variant`|A variant to be passed to react-native run-android, e.g. 'devDebug' to specify `--variant=devDebug`|n/a|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`scheme`|A scheme name to be passed to react-native run-ios, e.g. 'devDebug' to specify `--scheme=devDebug`|n/a|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`productName`|Bundle display name e.g 'AwesomeProject'|n/a|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved

## Using React Native commands in the Command Palette

In the Command Palette, type `React Native` and choose a command.
Expand Down Expand Up @@ -82,7 +105,7 @@ Debugger doesn't stop at breakpoints | Breakpoints require sourcemaps to be corr
'adb: command not found' | If you receive an error `adb: command not found`, you need to update your system Path to include the location of your *ADB* executable.The *ADB* executable file is located in a subdirectory along with your other Android SDK files.
Targeting iPhone 6 doesn't work | There was a known issue with React Native ([#5850](https://github.com/facebook/react-native/issues/5850)) but it was fixed. Please upgrade your version of React Native.
Can't communicate with socket pipe | (Linux only) If you have two workspaces open that only differ in casing, the extension will fail to communicate effectively.
"Add configuration" button doesn't work when trying to add debug configuration to `launch.json` | You may need to have to add in some json to `launch.json` manually. Please, see ([#985](https://github.com/Microsoft/vscode-react-native/issues/985))
"Add configuration" button doesn't work when trying to add debug configuration to `launch.json` | You may need to have to add in some json to `launch.json` manually. Please, see ([#985](https://github.com/Microsoft/vscode-react-native/issues/985))

[Known-Issues](https://github.com/Microsoft/vscode-react-native/issues?q=is%3Aissue+label%3Aknown-issues) provides a complete list of active and resolved issues.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"localRoot": {
"type": "string",
"description": "%reactNative.attach.localRoot.description%",
"default": "${workspaceRoot}"
"default": "${workspaceFolder}"
},
"skipFiles": {
"type": "array",
Expand Down