The following context menu options don't currently behave correctly with
WebAssembly or simply don't make sense, and are thus hidden from the UI
for now:
- 'Add condition breakpoint'
- 'Add logpoint'
- 'Edit breakpoint'
- 'Never pause here'
- 'Blackbox script'
- 'Continue to here'
Introduce a `DebuggerWorkspaceBinding.scripts()` method to iterate all
the scripts that are related to a given `UISourceCode`. We use that
method to check that every script related to the current `UISourceCode`
is JavaScript, and thus supports the full range of debugging
capabilities.
Bug: chromium:1136484
Change-Id: If6277b43b2fb2fb73e9f3aae53e09074b614f6ed
Fixed: chromium:1142275
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2498222
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
By using the script in crrev.com/c/devtools/devtools-frontend/+/1942289
we can prune all globals that are not actually global. Most of these are
internal private variables that are now module-scoped. Some variables
were also completely unused, which ESLint nicely reported.
Change-Id: I43689ac7544ad1239acc7d0eeec4dcd563d7fea9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Previously, auto-stepping experiment would only work when mapping is not
found at all, that is, there is no source file associated with a
particular byte offset.
This is not ideal in situations where a file exists, but underlying
JavaScript / Wasm instructions don't map 1:1 to the source language,
which is usually the case for compiled languages. In this case trying to
perform step-by-step debugging would lead to user visibly staying on the
same line and column in the source file, while V8 is stepping over
individual instructions / statements.
The reason for this is that SourceMap.findEntry doesn't look for an
exact match, but rather for a most suitable position in the source it
can map a byte offset to. This is what you usually want when stopping on
an exception, but not what you want when trying to step over some
statement in the source code.
This change enhances auto-stepping to detect such situations and
continue until a precise match is found.
Change-Id: I69ced14f0bdb219ec8f6b58864dbf23616a6230b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855967
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#705515}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6411844977f839675e37fb7d90a59e164aaa9432
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
The new compiler caught a lot of pre-existing issues in the codebase.
Sadly, the old compiler version was not smart enough to understand the
new changes. Therefore, the changes have be included in the same CL as
the compiler update.
Most of the changes are related to better handling of prototype and
class inheritance, as well as handling of null/undefined tracking.
Change-Id: I3941a3a240a4d09c4945e1e20d2521090ef837c9
Bug: 991710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762081
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca93474213278e32e36d6ace1474c56884030757
CompilerScriptMapping assumes that attaching sourcemaps get added to
`_contentScriptsBindings` or `_regularBindings`. Blackboxed sources
were skipped, for some reason, so detaching would throw an error.
In bad cases, navigations will detach sourcemaps, throw errors, and
prevent Console from clearing.
Bug: 888688
Change-Id: I2c460271a868eca9a6d67371d9097cc552f20b56
Reviewed-on: https://chromium-review.googlesource.com/c/1295310
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#601794}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 877430d2223351c42000a8fdef711514ca89e4df
New CallStackSidebarPane tries to finally split model and view by using
live locations more.
With new implementation each item maintains own state based on live
location updates and schedule updates of correspond list item.
drive-by: removed BlackboxManager.isRawLocationBlackboxed method.
R=lushnikov@chromium.org
Bug: none
Change-Id: I19adde997652754e5f90869ee41ab41899bf8ec4
Reviewed-on: https://chromium-review.googlesource.com/1168384
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#582044}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bceaccd337d6198f92ccca0467752210480d3e86
Replaced existing uiLocationToRawLocation with method that returns all
raw locations.
This helps to resolve some debugger problems:
- ModelBreakpoint can find raw location within its debugger model,
- SourceMapNamesResolver can resolve expression within model for
current call frame,
- possibleBreakpoints can get start and end location within one model.
DevTools frontend already has similar method for CSSWorkspaceBinding.
Proper behavior of ModelBreakpoint is critical for good breakpoint life
inside environment with a lot of targets, e.g. page with multiple workers,
node app with multiple processes.
R=lushnikov@chromium.org
Bug: none
Change-Id: I5e5c1782ed6b4c46d38cae9e95d642f47fca858a
Reviewed-on: https://chromium-review.googlesource.com/1163076
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#581096}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01ce7c99c8be325099f795b0ae160b9c489ef61e
Current logic produces one Debugger.setBlackboxedRanges call on each
scriptParsed event. It makes our frontend too much chatty.
This CL simplify blackbox manager. With new logic blackbox manager
sends Debugger.setBlackboxedRanges iff script has sourceMap and at
least one sourceURL from sourceMap is blackboxed.
When blackbox pattern changed frontend will send setBlackboxedRanges
iff ranges are affected by change.
R=lushnikov@chromium.org
Change-Id: I8b9511f9feba50127de4add98c8d191877103145
Reviewed-on: https://chromium-review.googlesource.com/1162308
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580742}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ba8a2397295a119aa848a1067ff1960ce2bb3f7