popcodeorg / popcodeorg/popcode

Console should pretty-print values

Open
#1,252 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
191
Forks
143
Avg merge
4d 11h
Merged PRs (30d)
5

Description

The JavaScript console should pretty-print values:

  • Values should be syntax highlighted
  • We should print all values in a reasonable way, including functions, complex objects (e.g. jQuery collection), etc.
  • As a baseline, the printing behavior for a given object should be at least as good as it is in the current built-in Chrome console

I suspect https://github.com/cvadillo/js-object-pretty-print will be of use—I’m thinking we will probably want to actually load this into the preview environment and just pass an already-pretty-printed string through the postMessage.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the JavaScript console and the preview environment's postMessage path, then review the referenced js-object-pretty-print project. Done should include syntax highlighting and reasonable output for functions, complex objects, and other values, with behavior at least comparable to Chrome's built-in console.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.