[DevTools] fixed missing new line between error stack trace and string cause for the error

When a "string" cause is printed, we currently concatenate it to the Error's stack trace on the same line without a line break.
This patch fixes the issue by wrapping all causes within divs. It also simplifies the logic for generating the error console message.

before & after:
https://imgur.com/a/Z6Hp6bc

Bug: 429968694
Change-Id: I73a1b338e1b9499c8469135e5fb59c82f560cf7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6718313
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2 files changed
tree: d5ec45134bd6732cc21558ce6ab21e12dbb75325
  1. .github/
  2. .vscode/
  3. build_overrides/
  4. config/
  5. docs/
  6. extension-api/
  7. extensions/
  8. front_end/
  9. inspector_overlay/
  10. node_modules/
  11. scripts/
  12. test/
  13. third_party/
  14. v8/
  15. .clang-format
  16. .clang-format-ignore
  17. .editorconfig
  18. .git-blame-ignore-revs
  19. .gitallowed
  20. .gitattributes
  21. .gitignore
  22. .gitmodules
  23. .gn
  24. .mailmap
  25. .npmignore
  26. .npmrc
  27. .style.yapf
  28. .stylelintignore
  29. .stylelintrc.json
  30. AUTHORS
  31. BUILD.gn
  32. codereview.settings
  33. CONTRIBUTING.md
  34. DEPS
  35. DIR_METADATA
  36. eslint.config.mjs
  37. favicon.ico
  38. LICENSE
  39. OWNERS
  40. package-lock.json
  41. package.json
  42. PRESUBMIT.py
  43. README.md
  44. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all TypeScript & CSS to run the DevTools webapp.

Source code and documentation

The frontend is available on chromium.googlesource.com. Check out the Chromium DevTools documentation for instructions to set up, use, and maintain a DevTools front-end checkout, as well as design guidelines, and architectural documentation.

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch

There are a few options to keep an eye on the latest and greatest of DevTools development: