目录

Debugging Extension Abilities

You can debug the ExtensionAbility lifecycle functions in either of the following ways:

Debugging the App at Startup

  1. Debug the project as instructed in Debugging an App at Startup.

  2. Set breakpoints in the lifecycle of the ExtensionAbility.

  3. Wait for the ExtensionAbility lifecycle function code to be called to hit the breakpoints.

Modifying the Run Configuration

  1. In the Run/Debug Configurations window, set Launch Options to Specified Ability.

  2. Select the ExtensionAbility you want to debug.

  3. Click OK to save the configuration and click to start debugging. This will hit the lifecycle function breakpoints in the ExtensionAbility.