You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strings and numbers should have different colored output #1526
Describe the bug
When I console log a string, I expect it to have a different color from numbers and booleans. They are all the same blue, though. However, if I log an object with those values, they get properly colored.
Note: Not sure if this is a bug or simply an expected feature that has not been implemented.
Thanks for the report. This is because top level output is given as a string and is not as rich as the full 'variables' we send on the debug protocol for the object. I think the best fix for this is microsoft/debug-adapter-protocol#85, which would let us provide variables for these output lines..
Requiring the client to make individual variables requests for every log line would fix this issue, but cause performance problems. In fact we go to a deal of effort to avoid this for most log lines, as scripts that log thousands of lines quickly become problematic if each line requires duplicate requests from the client.
Got it. Thanks for the info. Is there any idea on when that issue will get put through? I see it's over three years old :( I realize you must have a lot of stuff on your plate though and it's all important. Just curious if there's a roadmap or anything to mark on the calendar to check back in on. Thanks again.
It's not a big priority for me since I've worked around the main ordering and performance problem is js-debug already. But if you feel strongly, I would invite you to start in the discussion in that issue. A reasonable proposal would be to add an optional variable?: Variable property on the output event.
Activity
connor4312 commentedon Jan 23, 2023
Thanks for the report. This is because top level
outputis given as a string and is not as rich as the full 'variables' we send on the debug protocol for the object. I think the best fix for this is microsoft/debug-adapter-protocol#85, which would let us provide variables for these output lines..Requiring the client to make individual variables requests for every log line would fix this issue, but cause performance problems. In fact we go to a deal of effort to avoid this for most log lines, as scripts that log thousands of lines quickly become problematic if each line requires duplicate requests from the client.
Closing this to merge into that issue
mhkeller commentedon Jan 23, 2023
Got it. Thanks for the info. Is there any idea on when that issue will get put through? I see it's over three years old :( I realize you must have a lot of stuff on your plate though and it's all important. Just curious if there's a roadmap or anything to mark on the calendar to check back in on. Thanks again.
connor4312 commentedon Jan 23, 2023
It's not a big priority for me since I've worked around the main ordering and performance problem is js-debug already. But if you feel strongly, I would invite you to start in the discussion in that issue. A reasonable proposal would be to add an optional
variable?: Variableproperty on the output event.