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

Feature/update line numbers #243

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jangxyz
Copy link

@jangxyz jangxyz commented Dec 2, 2024

This PR fixes #238 , by adding two new commands: "turboConsoleLog.updateAllLogMessages" and "turboConsoleLog.updateLogMessage".

Demo

output

The former detects all log messages (by calling the .detectAll() method), and replace the line with the new updated line. The .updateFileNameAndLineNum() method in JSDebugMessage class does a simple regex change.
The latter limits the update only to the lines in the editor.selections.

There are no tests, and it is a bit naive at the moment. If you are more interested, I can dive into the test codes as well. Feel free to leave a comment.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀🚀🚀 Auto change line number in console.log when line no changed
2 participants