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 16 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|Type|Defaults|
|---|---|---|---|
|`cwd`|The path to the project root folder|`string`|`${workspaceFolder}`|
|`sourceMaps`|Whether to use JavaScript source maps to map the generated bundled code back to its original sources|`boolean`|`true`|
|`sourceMapPathOverrides`|A set of mappings for rewriting the locations of source files from what the source map says, to their locations on disk. See [Debugging with TypeScript and Haul](https://github.com/Microsoft/vscode-react-native/blob/master/doc/debugging.md#debugging-with-typescript-and-haul) for details|`object`|n/a|
|`trace`|Logging level in debugger process. May be useful for diagnostics. If set to "Trace" all debugger process logs will be available in `Debug Console` output window|`string`|`log`|
|`address`|TCP/IP address of debug server (packager)|`string`|`localhost`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`port`|Debug port to attach to|`string`|`8081`|
SounD120 marked this conversation as resolved.
Show resolved Hide resolved
|`remoteRoot`|The source root of the remote host|`string`|`null`|
|`localRoot`|The local source root that corresponds to the 'remoteRoot'|`string`|`${workspaceFolder}`|
|`skipFiles`|An array of file or folder names, or glob patterns, to skip when debugging|`array`|`[]`|
|`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)|`string`|`debugger-ui/`|
|`platform`|The platform to target. Possible values: `android`, `ios`, `exponent`, `windows`, `wpf`|`string`|n/a|
|`target`|Target to run on. Possible values: `simulator`, `device`, `<Android emulator/device id>`, `<iOS simulator/device name>`|`string`|`simulator`|
|`logCatArguments`|Arguments to be used for LogCat (The LogCat output will appear on an Output Channel). It can be an array such as: `[":S", "ReactNative:V", "ReactNativeJS:V"]`|`array`|`["*:S", "ReactNative:V", "ReactNativeJS:V"]`|
|`runArguments`|Run arguments to be passed to `react-native run-<platform>` command (override all other configuration params)|`array`|n/a|
|`env`|Environment variables passed to the debugger and `react-native run-<platform>` command|`object`|`{}`|
|`envFile`|Absolute path to a file containing environment variable definitions|`string`|`${workspaceFolder}/.env`|
|`variant`|A variant to be passed to `react-native run-android`, e.g. use `devDebug` to specify `--variant=devDebug`|`string`|n/a|
|`scheme`|A scheme name to be passed to `react-native run-ios`, e.g. `devDebug` to specify `--scheme=devDebug`|`string`|n/a|
|`productName`|iOS bundle display name e.g. `AwesomeProject` value means that extension will search for `AwesomeProject.app` bundle|`string`|n/a|

## 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
26 changes: 13 additions & 13 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@
"reactNative.snippets.attachPackager.description":"A new configuration for attaching to packager",
"reactNative.snippets.debugExpo.description":"A new configuration for launching Expo app",
"reactNative.attach.program.description":"[DEPRECATED. USE cwd INSTEAD] The path to launchReactNative.js in the vscode folder",
"reactNative.attach.cwd.description":"The path to project root folder",
"reactNative.attach.cwd.description":"The path to the project root folder",
"reactNative.attach.sourceMaps.description":"Whether to use JavaScript source maps to map the generated bundled code back to its original sources",
"reactNative.attach.sourceMapsPathOverrides.description":"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",
"reactNative.attach.trace.description":"Setup logging level in debugger.",
"reactNative.attach.address.description":"TCP/IP address of debug port. Default is 'localhost'.",
"reactNative.attach.trace.description":"Logging level in debugger process. May be useful for diagnostics. If set to \"Trace\" all debugger process logs will be available in 'Debug Console' output window.",
"reactNative.attach.address.description":"TCP/IP address of debug server (packager). Default is 'localhost'.",
"reactNative.attach.port.description":"Debug port to attach to. Default is 8081.",
"reactNative.attach.remoteRoot.description":"The source root of the remote host.",
"reactNative.attach.localRoot.description":"The local source root that corresponds to the 'remoteRoot'.",
"reactNative.attach.skipFiles.description":"An array of file or folder names, or glob patterns, to skip when debugging.",
"reactNative.attach.debuggerWorkerUrlPath.description": "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).",
"reactNative.launch.platform.description":"The platform to target",
"reactNative.launch.platform.description":"The platform to target. Possible values: 'android', 'ios', 'exponent', 'windows', 'wpf'",
"reactNative.launch.program.description":"[DEPRECATED. USE cwd INSTEAD] The path to launchReactNative.js in the vscode folder",
"reactNative.launch.cwd.description":"The path to project root folder",
"reactNative.launch.target.description":"Device target to run on (either device or simulator)",
"reactNative.launch.cwd.description":"The path to the project root folder",
"reactNative.launch.target.description":"Target to run on. Possible values: 'simulator', 'device', '<Android emulator/device id>', '<iOS simulator/device name>'",
"reactNative.launch.sourceMaps.description":"Whether to use JavaScript source maps to map the generated bundled code back to its original sources",
"reactNative.launch.logCatArguments.description":"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\"",
"reactNative.launch.logCatArguments.description":"Arguments to be used for LogCat (The LogCat output will appear on an Output Channel). It can be an array such as: [\":S\", \"ReactNative:V\", \"ReactNativeJS:V\"]",
"reactNative.launch.outDir.description":"The location of the generated JavaScript code (the bundle file). Normally this should be \"${workspaceRoot}/.vscode/.react\"",
"reactNative.launch.runArguments.description":"Run arguments to be passed to 'react-native run-<platform>' command(Override all other configuration params)",
"reactNative.launch.env.description":"Environment variables passed to the program.",
"reactNative.launch.runArguments.description":"Run arguments to be passed to 'react-native run-<platform>' command (override all other configuration params)",
"reactNative.launch.env.description":"Environment variables passed to the debugger and 'react-native run-<platform>' command.",
"reactNative.launch.envFile.description":"Absolute path to a file containing environment variable definitions.",
"reactNative.launch.variant.description":"A variant to be passed to react-native run-android, e.g. 'devDebug' to specify --variant=devDebug",
"reactNative.launch.scheme.description":"A scheme name to be passed to react-native run-ios, e.g. 'devDebug' to specify --scheme=devDebug",
"reactNative.launch.productName.description":"Bundle display name e.g 'AwesomeProject'",
"reactNative.launch.variant.description":"A variant to be passed to 'react-native run-android', e.g. use 'devDebug' to specify '--variant=devDebug'",
"reactNative.launch.scheme.description":"A scheme name to be passed to 'react-native run-ios', e.g. 'devDebug' to specify '--scheme=devDebug'",
"reactNative.launch.productName.description":"iOS bundle display name e.g. 'AwesomeProject' value means that extension will search for 'AwesomeProject.app' bundle",
"reactNative.launch.skipFiles.description":"An array of file or folder names, or glob patterns, to skip when debugging.",
"reactNative.launch.trace.description":"Setup logging level in debugger.",
"reactNative.launch.trace.description":"Logging level in debugger process. May be useful for diagnostics. If set to \"Trace\" all debugger process logs will be available in 'Debug Console' output window.",
"reactNative.launch.debuggerWorkerUrlPath.description": "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).",
"reactNative.configuration.title":"React-Native configuration",
"reactNative.configuration.properties.react-native.ios.runArguments.simulator.description":"Run arguments to be passed to 'react-native run-ios' command",
Expand Down