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

Add scene logs #442

Merged
merged 15 commits into from
Mar 3, 2025
Merged

Add scene logs #442

merged 15 commits into from
Mar 3, 2025

Conversation

nicoecheza
Copy link
Contributor

@nicoecheza nicoecheza commented Feb 12, 2025

requires decentraland/js-sdk-toolchain#1070

closes #327 (figma link included in issue)

Scene Debugger Implementation

This PR introduces a new Scene Debugger feature that allows developers to view console output from their scenes in a dedicated window.

Key Changes

New Features

  • Added Scene Debugger window implementation with real-time console output display
  • Implemented ANSI color support for console output using ansi-to-html
  • Added circular buffer implementation for efficient log management
  • Created new debugger UI with auto-scrolling logs view

Dependencies

  • Added ansi-to-html package for console color support

Testing

  • Test debugger window creation
  • Verify log output and ANSI color rendering
  • Test multiple debugger windows
  • Verify cleanup when closing windows
  • Test auto-scrolling behavior
Screenshot 2025-02-17 at 1 21 11 PM

How to test:

  • Create a new scene (mandatory since we need to use the latest version of @dcl/sdk)
  • Enter that new scene
  • Click on "Preview" button dropdown & select to open the debugger
  • Click on "Preview" button
  • Enjoy

@nicoecheza nicoecheza force-pushed the add/scene-logs branch 4 times, most recently from 8a54cd0 to b2f3e6b Compare February 13, 2025 16:53
@nicoecheza nicoecheza changed the title Add/scene logs Add scene logs Feb 17, 2025
@nicoecheza nicoecheza force-pushed the add/scene-logs branch 5 times, most recently from bf3ed69 to 6034d17 Compare February 17, 2025 22:55
Copy link

github-actions bot commented Feb 17, 2025

Test this pull request on windows-latest

Download the correct version for your architecture:

win-x64

Copy link

github-actions bot commented Feb 17, 2025

Test this pull request on macos-latest

Download the correct version for your architecture:

mac-arm64
mac-x64

Click here if you don't know which version to download

For running this unsigned version of the app, you will need to run the xattr command on it:

  1. Extract the app from the downloaded .dmg file (double-click it)
  2. Place the extracted app anywhere you like in your file system
  3. Open a terminal on the directory where the app is
  4. Run xattr -c app-name, replacing "app-name" for the actual name of the app
  5. Double-click the app ✅

@nicoecheza nicoecheza force-pushed the add/scene-logs branch 4 times, most recently from 415472f to 2eeafda Compare February 21, 2025 15:38
@nicoecheza nicoecheza marked this pull request as ready for review February 21, 2025 18:09
@nicoecheza nicoecheza force-pushed the add/scene-logs branch 2 times, most recently from 78f1093 to e57410d Compare February 24, 2025 14:57
Copy link
Collaborator

@cyaiox cyaiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left minor comments, overall good work!

@DafGreco
Copy link

DafGreco commented Mar 3, 2025

Hey team! tested all the requirements of the PR in both platforms! ✅

Test debugger window creation ✅
Comment: done!
Verify log output and ANSI color rendering✅
Comment : Done!
Test multiple debugger windows ✅
Comment: seems that multiple debugger windows can be supported
Verify cleanup when closing windows ✅
Comment: Done!
Test auto-scrolling behavior✅
comment: auto-scrolling done!

@nicoecheza nicoecheza merged commit eb0b2fd into main Mar 3, 2025
10 checks passed
@nicoecheza nicoecheza deleted the add/scene-logs branch March 3, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Console to show error messages
3 participants