Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node LogPoints should support outputting well formatted objects #47275

Closed
auchenberg opened this issue Apr 6, 2018 · 2 comments
Closed

Node LogPoints should support outputting well formatted objects #47275

auchenberg opened this issue Apr 6, 2018 · 2 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality release-notes Release notes issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@auchenberg
Copy link
Contributor

Per conversation microsoft/vscode-node-debug#174

Node LogPoints should support outputting well formatted objects

Example:
image

So what could be a solution here?

Breakdown expressions and forward to console.log as arguments?

Product: {product} -> console.log('Product:', product)?

Product.constructor.getProduct for {product.id}, result: {product} ->
console.log('Product.constructor.getProduct for :', product.id, "result:", product)?

Use formatting options for expressions:

Chrome/Node supports print-if style formatting. Se https://developers.google.com/web/tools/chrome-devtools/console/console-reference#format-specifiers and https://nodejs.org/api/util.html#util_util_format_format_args

Product: {product} -> console.log('Product %o', product)?

Product.constructor.getProduct for {product.id}, result: {product} ->
console.log('Product.constructor.getProduct for %o, result: %o, product.id, product)?

https://developers.google.com/web/tools/chrome-devtools/console/console-write

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality labels Apr 6, 2018
@weinand weinand added this to the On Deck milestone Apr 6, 2018
@roblourens
Copy link
Member

Before, debug console and terminal:
image

image

After:
image

image

@roblourens roblourens modified the milestones: On Deck, April 2018 Apr 23, 2018
roblourens added a commit to microsoft/vscode-chrome-debug-core that referenced this issue Apr 23, 2018
@roblourens roblourens added the verification-needed Verification of issue is requested label Apr 23, 2018
@isidorn isidorn added the verified Verification succeeded label Apr 24, 2018
@weinand weinand added the release-notes Release notes issues label Apr 25, 2018
@weinand
Copy link
Contributor

weinand commented Apr 27, 2018

@roblourens I've added this to the "Logpoints improvements" section in the release notes (and to a screencast):
https://github.com/Microsoft/vscode-docs/blob/vnext/release-notes/v1_23.md#logpoint-improvements

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality release-notes Release notes issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants