Display full error object all the time regardless of argument position
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Start with the behavior in src/common.js at the linked line and review the README's debug argument documentation. Check issues #334 and #711 for existing decisions or constraints. Document how Error objects are displayed based on argument position, or clarify the agreed scope if an option is required; the README should accurately describe the resulting behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A quick explanation:
var debug = require('debug')('http');
const error = new Error('hi');
error.info= { display: 'me' };
debug(error) ;
debug('', error); // this will output info object
This is not mentioned in the readme and I had to hunt the reason for this. If an error is the first argument, it will be coerced.
https://github.com/debug-js/debug/blob/f66cb2d9f729e1a592e72d3698e3b75329d75a25/src/common.js#L82
At the very least, this behavior should be documented in the readme.
An option could be added to change this behavior. At first, the option could default to the current behavior and then the default behavior can be changed after a reasonable period.
This issue is related to https://github.com/debug-js/debug/issues/334. This open issue is also related, https://github.com/debug-js/debug/issues/711.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.5k
- Fork
- 992
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của debug-js/debug
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Debug as JSON Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
console.group and groupCollapsed Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
Tất cả issue của debug-js/debug
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Daemon passes --experimental-wasm-jspi unconditionally on Node >= 24; Node 26 rejects the flag Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Automattic/studio#4908 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
sugarlabs/musicblocks#8847 ·