You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PublicAPI.md
+98
Original file line number
Diff line number
Diff line change
@@ -552,6 +552,8 @@ After calling the method once, you can add new devices to the same LiveSync oper
552
552
553
553
> NOTE: In case a consecutive call to `liveSync` method requires change in the pattern for watching files (i.e. `liveSyncData.syncAllFiles` option has changed), current watch operation will be stopped and a new one will be started.
554
554
555
+
> NOTE: In case `debugggingEnabled` is set to `true` in a deviceDescriptor, debugging will initially be enabled for that device and a debugger will be attached after a successful livesync operation.
Enables debugging during a LiveSync operation. This method will try to attach a debugger to the application. Note that `userInteractionNeeded` event may be raised. Additional details about the arguments can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts).
630
+
631
+
* Definition
632
+
```TypeScript
633
+
/**
634
+
* Enables debugging for the specified devices
635
+
* @param{IEnableDebuggingDeviceOptions[]}deviceOpts Settings used for enabling debugging for each device.
636
+
* @param{IDebuggingAdditionalOptions}enableDebuggingOptions Settings used for enabling debugging.
637
+
* @returns{Promise<void>[]} Array of promises for each device.
Attaches a debugger to the specified device. Additional details about the argument can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts).
660
+
661
+
* Definition
662
+
```TypeScript
663
+
/**
664
+
* Attaches a debugger to the specified device.
665
+
* @param{IAttachDebuggerOptions}settings Settings used for controling the attaching process.
Disables debugging during a LiveSync operation. This method will try to detach a debugger from the application. Additional details about the arguments can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts).
681
+
682
+
* Definition
683
+
```TypeScript
684
+
/**
685
+
* Disables debugging for the specified devices
686
+
* @param{IDisableDebuggingDeviceOptions[]}deviceOptions Settings used for disabling debugging for each device.
687
+
* @param{IDebuggingAdditionalOptions}debuggingAdditionalOptions Settings used for disabling debugging.
688
+
* @returns{Promise<void>[]} Array of promises for each device.
`liveSyncService` raises several events in order to provide information for current state of the operation.
628
716
* liveSyncStarted - raised whenever CLI starts a LiveSync operation for specific device. When `liveSync` method is called, the initial LiveSync operation will emit `liveSyncStarted` for each specified device. After that the event will be emitted only in case when liveSync method is called again with different device instances. The event is raised with the following data:
@@ -718,6 +806,16 @@ tns.liveSyncService.on("notify", data => {
718
806
});
719
807
```
720
808
809
+
* userInteractionNeeded - raised whenever CLI needs to restart an application but cannot so the user has to restart it manually. The event is raised with an object, which can later be passed to `attachDebugger` method of `liveSyncService`:
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
723
821
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
@@ -137,7 +137,6 @@ export class DebugIOSCommand implements ICommand {
137
137
private$injector: IInjector,
138
138
private$projectData: IProjectData,
139
139
private$platformsData: IPlatformsData,
140
-
private$iOSDebugService: IDebugService,
141
140
$iosDeviceOperations: IIOSDeviceOperations){
142
141
this.$projectData.initializeProjectData();
143
142
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
@@ -168,7 +167,7 @@ export class DebugAndroidCommand implements ICommand {
0 commit comments