Skip to content

[DevTools Bug]: console.log throws type error if one of the arguments is symbol #21518

Closed
@leidegre

Description

@leidegre

Website or app

formatted += ' ' + args.join(' ');

Repro steps

This function will throw this error if one of the arguments is type of symbol.

The error is swallowed here but it does interfere with debugging. When I run with the "pause on caught exceptions" I get trapped here all the time.

Can we change

if (args.length) {
  formatted += ' ' + args.join(' ');
} // update escaped %% values

into

for (let i = 0; i < args.length; i++) {
  formatted += ' ' + String(args[i]);
} // update escaped %% values

???

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

4.13.2-e468072e17

Error message (automated)

TypeError: Cannot convert a Symbol value to a string

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions