getPossibleBreakpoints method
Future<List<WipBreakLocation> >
getPossibleBreakpoints(
- WipLocation start, {
- WipLocation? end,
- bool? restrictToFunction,
Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
start
: Start of range to search possible breakpoint locations inend
: End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.restrictToFunction
: Only consider locations which are in the same (non-nested) function as start.
Implementation
Future<List<WipBreakLocation>> getPossibleBreakpoints(
WipLocation start, {
WipLocation? end,
bool? restrictToFunction,
}) async {
Map<String, dynamic> params = {
'start': start.toJsonMap(),
};
if (end != null) {
params['end'] = end.toJsonMap();
}
if (restrictToFunction != null) {
params['restrictToFunction'] = restrictToFunction;
}
final WipResponse response =
await sendCommand('Debugger.getPossibleBreakpoints', params: params);
if (response.result!.containsKey('exceptionDetails')) {
throw ExceptionDetails(
response.result!['exceptionDetails'] as Map<String, dynamic>);
} else {
List locations = response.result!['locations'];
return List.from(locations.map((map) => WipBreakLocation(map)));
}
}