libraryIsDebuggable method

Future<bool> libraryIsDebuggable(
  1. ThreadInfo thread,
  2. Uri uri
)

Checks whether a library URI should be considered debuggable.

Initial values are provided in the launch arguments, but may be updated by the updateDebugOptions custom request.

Implementation

Future<bool> libraryIsDebuggable(ThreadInfo thread, Uri uri) async {
  if (isSdkLibrary(uri)) {
    return isolateManager.debugSdkLibraries;
  } else if (!isolateManager.debugExternalPackageLibraries &&
      await isExternalPackageLibrary(thread, uri)) {
    return false;
  } else {
    return true;
  }
}