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 macOS platform support for debugging #1409

Merged
merged 22 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
fa3feb3
Add macOS support
SounD120 Sep 21, 2020
1d33185
Add Add macOS platform initialization
SounD120 Sep 21, 2020
7fb0dd6
Add more handling for RN macOS
SounD120 Sep 21, 2020
02b2c00
Add macOS platform variant
SounD120 Sep 22, 2020
17b3a2d
Fix platform support
SounD120 Sep 22, 2020
620cc6b
Add macos support
SounD120 Sep 23, 2020
2ffc5d1
Add checks for macos platform
SounD120 Sep 23, 2020
c10475d
Add comments, add macOS debug scenario
SounD120 Sep 23, 2020
b0da4ad
Add test for macOS sourcemap case
SounD120 Sep 23, 2020
b31735a
Fix link case in the test
SounD120 Sep 23, 2020
e6f6bde
Add additional check to avoid possible problems in future
SounD120 Sep 24, 2020
c38a6b0
Fix if condition
SounD120 Sep 24, 2020
d82db40
Add more telemetry cases for macOS, fix macOS/MacOS cases in some cas…
SounD120 Sep 24, 2020
93dc5ae
Refactor the extension telemetry approach for additional packages
SounD120 Sep 24, 2020
8e29e39
Rename function name, minor fixes
SounD120 Sep 24, 2020
0646c08
Add information about macOS apps debugging in documentation
SounD120 Sep 25, 2020
52f9beb
Update documentation
SounD120 Sep 25, 2020
65d28a8
Update README.md
SounD120 Sep 25, 2020
b75695f
Merge branch 'master' into add-macos-platform-support
SounD120 Sep 28, 2020
3d05a3c
Merge branch 'master' into add-macos-platform-support
SounD120 Oct 1, 2020
f954562
Merge branch 'master' into add-macos-platform-support
SounD120 Oct 2, 2020
7ab72a4
Merge branch 'master' into add-macos-platform-support
SounD120 Oct 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ Using this extension, you can **debug your code and quickly run `react-native` c
- [Getting started](#getting-started)
- [React Native commands in the Command Palette](#react-native-commands-in-the-command-palette)
- [Debugging React Native applications](#debugging-react-native-applications)
- [Hermes (Android)](#hermes-android)
- [iOS devices](#ios-devices)
- [Custom scheme for iOS apps](#custom-scheme-for-ios-apps)
- [iOS direct debugging](#iOS-direct-debugging)
- [Hermes (Android) applications](#hermes-android)
- [iOS applications](#ios-applications)
- [iOS devices](#ios-devices)
- [Custom scheme for iOS apps](#custom-scheme-for-ios-apps)
- [iOS direct debugging](#iOS-direct-debugging)
- [Expo applications](#expo-applications)
- [Configuring Expo](#configuring-expo)
- [Windows applications](#react-native-for-windows)
- [TypeScript and Haul](#typescript-and-haul)
- [macOS applications](#react-native-for-macos)
- [TypeScript and Haul based applications](#typescript-and-haul)
- [Debugger configuration properties](#debugger-configuration-properties)
- [Customization](#customization)
- [Logging](#logging)
Expand Down Expand Up @@ -130,8 +132,9 @@ To debug while using Hermes engine, please choose one of the following debug con
"request": "attach"
}
```
## iOS applications

## iOS devices
### iOS devices

Debugging on an iOS device requires following manual steps:

Expand All @@ -141,7 +144,7 @@ Debugging on an iOS device requires following manual steps:
- Choose the **Debug iOS** option from the "Configuration" dropdown and press F5.
- Shake the device to open the development menu and select "Debug JS Remotely".

## Custom scheme for iOS apps
### Custom scheme for iOS apps

If you want to use a custom scheme for your application you can either pass it as part of the `runArguments` parameter arguments, or set the `scheme` configuration parameter as shown below:

Expand All @@ -155,7 +158,7 @@ If you want to use a custom scheme for your application you can either pass it a

Please be aware, specifying the scheme value as a part of the `runArguments` parameter arguments will override the `scheme` configuration parameter value, if it set.

## iOS direct debugging
### iOS direct debugging

The extension provides experimental support of iOS direct debugging. See more info here: [react-native-community/discussions-and-proposals#40](https://github.com/react-native-community/discussions-and-proposals/issues/40), [react-native-community/discussions-and-proposals#206](https://github.com/react-native-community/discussions-and-proposals/issues/206)

Expand Down Expand Up @@ -245,7 +248,7 @@ If you want to change your app entrypoint (for example, from `index.js` to `inde

**NOTE**: The extension caches the version of the exponent SDK used by your project. This is helpful since we don't want to install the SDK each time you run exponent. If you want the extension to update the SDK version based on your React Native version, just restart VS Code and if it is supported it should work. If it does not please open an issue.

## Windows applications
## React Native for Windows

You can debug UWP and WPF React Native for Windows applications by changing the `platform` in your `launch.json` configuration:

Expand Down Expand Up @@ -273,6 +276,24 @@ You can debug UWP and WPF React Native for Windows applications by changing the
}
```

You can find more information on how to setup your application to work with Windows in [React Native for Windows Getting started instruction](https://microsoft.github.io/react-native-windows/docs/getting-started)

## React Native for macOS

You can debug React Native for macOS applications by changing the `platform` in your `launch.json` configuration to `macos`:

```json
{
"name": "Debug macOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "macos"
}
```

You can find more information on how to setup your application to work with macOS in [React Native for macOS Getting started instruction](https://microsoft.github.io/react-native-windows/docs/rnm-getting-started)

## TypeScript and Haul

### Sourcemaps
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,17 @@
"platform": "windows"
}
},
{
"label": "React Native: Debug macOS",
"description": "%reactNative.snippets.debugmacOS.description%",
"body": {
"name": "Debug macOS",
"cwd": "^\"\\${workspaceFolder}\"",
"type": "reactnative",
"request": "launch",
"platform": "macos"
}
},
{
"label": "React Native: Attach to packager",
"description": "%reactNative.snippets.attachPackager.description%",
Expand Down Expand Up @@ -291,7 +302,8 @@
"android",
"exponent",
"windows",
"wpf"
"wpf",
"macos"
],
"description": "%reactNative.launch.platform.description%"
},
Expand Down