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

Debugger enhancements #5288

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Debugger enhancements #5288

wants to merge 3 commits into from

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Sep 16, 2024

Description Of Changes

The way our current debugger is working, we lose the originating file and line number from the original call. By bumping the called function into the global scope, it behaves like a normal log but with the added benefit of only working in debug mode. These changes support both the browser and nodejs environments by adding global as a child of window, mimicking the global of node. This is how other frameworks have accomplished this (eg. Angular) and is not an uncommon practice.

Code Changes

  • Add fidesLogger to the global scope as a conditional
  • Add global as a child of window
  • Replace instances of debugLog with global.fidesLogger (named to avoid conflicts)
  • Remove debugLog

Steps to Confirm

  • Visit the demo page in debug mode. Note the logs in the browser console now show the filename/line of where the log was called, rather than the utility file line where the debugLog was set.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 9:49pm

@gilluminate gilluminate changed the title Gill/debugger enhancements Debugger enhancements Sep 16, 2024
@gilluminate gilluminate force-pushed the gill/debugger-enhancements branch 3 times, most recently from 294478d to f2c47ff Compare September 24, 2024 21:40
Copy link

cypress bot commented Sep 24, 2024

fides    Run #10110

Run Properties:  status check passed Passed #10110  •  git commit 243f8c9081 ℹ️: Merge be821beb608889a520343f53730859bd969bd651 into 06d25c744e7863bc3af0ed44c586...
Project fides
Branch Review refs/pull/5288/merge
Run status status check passed Passed #10110
Run duration 00m 39s
Commit git commit 243f8c9081 ℹ️: Merge be821beb608889a520343f53730859bd969bd651 into 06d25c744e7863bc3af0ed44c586...
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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.

1 participant