question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Define a JS API for handling debug messages and warnings

See original GitHub issue

The JS API is currently missing a means of handling messages generated by the @debug and @warn directives, as well as deprecation warnings generated by the implementation itself. Node Sass has the ability to provide a custom function named @warn that handles warnings, but this is neither documented nor supported by Dart Sass. Dart Sass has the ability to pass in subclasses of Logger to handle these callbacks. We should come up with a similar Logger-style API for JS.

See https://github.com/sass/dart-sass/issues/585

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:28 (27 by maintainers)

github_iconTop GitHub Comments

3reactions
nex3commented, Jun 9, 2021

The proposal has landed. I’m going to wait until the in-progress proposals for the new JS API have landed to officially request comments, though, so we can request for all of these at once.

2reactions
nex3commented, Aug 6, 2021

This proposal is now officially out for review. It will remain that way for at least a month (potentially longer depending on discussion), at which point we’ll move on to implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

console.warn() - Web APIs | MDN
The console.warn() method outputs a warning message to the Web console.
Read more >
A Definitive Guide to Handling Errors in JavaScript - Kinsta
Getting tripped up by errors in your JavaScript? We'll show you how to tame those errors so you can get back to developing...
Read more >
Best Practices for Node.js Error-handling - Toptal
This article will introduce you to error-handling in Node.js and ... The warning messages don't do much except logging, but it is a...
Read more >
Error Messages | Maps JavaScript API - Google Developers
Checking Errors in Your Browser; Handling unsupported browsers ... The Maps JavaScript API writes error and warning messages to the JavaScript console.
Read more >
10. Debugging and Error Handling - JavaScript Cookbook ...
You want a simple way to check the value of a variable. Solution. Use an alert message box to output the value of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found