Files
react-native-devtools-frontend/test
Simon Zünd 7342aa3a71 [breakpoints] Substitute variables in breakpoint conditions
This CL extends the 'evaluateExpressionsWithSourceMaps' to
conditional breakpoints. To make this work, we call the newly
added 'allVariablesAtPosition' NameResolver that works
independent of the page being paused or not.

We apply the variable substitution on the ModelBreakpoint level
and only if we have a concrete `SDK.Script` instance. This means
that if the same authored code shows up in different bundles
with different variable names, we'll do the substitution per
bundle correctly.

Note that 'Breakpoint#backendCondition()' now has two overloads:

  1) If no location is passed in, we don't substitute variables.
     In this case there is no async work so we return no promise.

  2) If a location is passed in and the experiment is enabled we
     return a promise since variable substitution can take some
     time.

We implemented 'backendCondition' this way because otherwise we'd
have to propagate async/await up the call-chain and in some places
we want to keep things synchronous (e.g. initalizing the
BreakpointManager).

As a follow-up we should store the calculated backend condition
also in the storage state, so that when we set breakpoints
eagerly on DevTools startup, we can send the substituted condition.

R=jarin@chromium.org

Bug: 1444349
Change-Id: I59af6fbfe39ce08daff1f4662342542e0199bd12
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4675896
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-07-13 07:34:34 +00:00
..
2023-07-11 16:52:27 +00:00
2023-07-12 21:08:53 +00:00
2021-09-17 09:58:39 +00:00
2021-03-25 12:42:58 +00:00
2021-04-08 12:25:52 +00:00