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

[Bug] Enhance File Name and Line Number Handling in Log Messages #247

Open
Chakroun-Anas opened this issue Jan 23, 2025 · 0 comments
Open
Assignees
Labels
bug Something isn't working enhancement Request regarding an existing feature high-priority High priority issue roadmap Future features that could be integrated

Comments

@Chakroun-Anas
Copy link
Owner

Chakroun-Anas commented Jan 23, 2025

Describe the bug

Turbo Console Log currently has two main issues with file name and line number handling:

  1. Line Numbers Do Not Update:

    • When the "Include File Name and Line Number" setting is enabled, the log message includes the line number. However, the line number remains outdated if lines are added/removed above the console.log or if the log message is moved.
  2. File Name and Line Number are Bundled Together:

    • The current format (file: <fileName>:<lineNumber>) does not allow users to include only the file name or only the line number.

These issues reduce flexibility and reliability for users who depend on precise log outputs.


Code snippet

// Current behavior
console.log('file: example.js:10 🔥 result:', result); // Shows outdated line number after file modification.

// Desired behavior
// If lines are added above or the log is moved, the line number should automatically update.

// Proposed customizable formats:
console.log('file: example.js 🔥 result:', result); // File name only.
console.log('line: 10 🔥 result:', result); // Line number only.
console.log('example.js:10 🔥 result:', result); // File name and line number together.

Steps to reproduce

  1. Enable the "Include File Name and Line Number" setting in Turbo Console Log.
  2. Add console.log messages to your file.
  3. Perform one of the following actions:
    • Add or remove lines above the log message.
    • Move the log message to a different location.
  4. Observe that the line number does not update in the log message.

Screenshots

(Include relevant screenshots to demonstrate the current behavior and expected behavior.)


Expected behavior

Line numbers in log messages should dynamically update when lines are added, removed, or moved in the file.


Context:

  • OS name and version: [e.g., Windows 11]
  • VSCode version: [e.g., v1.80.2]
  • Extension version: [e.g., v2.10.0]

Related Issues

This parent issue consolidates the following related issues for better context and tracking:

By addressing these issues, Turbo Console Log will provide a more reliable and customizable logging experience.


Additional context

These fixes will significantly enhance the usability of the extension, addressing long-standing user concerns and improving functionality.

@Chakroun-Anas Chakroun-Anas added bug Something isn't working high-priority High priority issue roadmap Future features that could be integrated labels Jan 23, 2025
@Chakroun-Anas Chakroun-Anas added this to the Stability Update milestone Jan 23, 2025
@Chakroun-Anas Chakroun-Anas self-assigned this Jan 23, 2025
@Chakroun-Anas Chakroun-Anas added the enhancement Request regarding an existing feature label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Request regarding an existing feature high-priority High priority issue roadmap Future features that could be integrated
Projects
None yet
Development

No branches or pull requests

1 participant