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

diff while on breakpoint #10

Closed
ghost23 opened this issue Jan 16, 2023 · 2 comments
Closed

diff while on breakpoint #10

ghost23 opened this issue Jan 16, 2023 · 2 comments

Comments

@ghost23
Copy link

ghost23 commented Jan 16, 2023

Hi,

I have set a breakpoint at a location in my javascript and while dev tools has paused on that breakpoint I want to diff two objects, which dev tools is showing me. But console.diff(.., ..) is not showing anything in the JSDiff panel when I am on a breakpoint, it seems.

Is this even possible?

@zendive
Copy link
Owner

zendive commented Mar 12, 2023

Hi @ghost23 ,

It's not possible to see diff results while paused cause it's the same "top window context" [that is paused] responsible to window.postMessage the arguments to background page of extension. src/js/jsdiff-devtools.js@96.
I'm not aware of other methods.

Howether there are workarounds:

  • embed console.diff?.(arg1, arg2); into your application, for the timespan of development, then put debugger; after that, to give time to observe the result. Or if code-place allows manual triggering - probably diffPush function would be more handy in that case.
  • last resort - while paused, use "Store object as global variable" from context menu like temp1, temp2, etc... Then, after pause, evaluate console.diff(temp1, temp2) on them.

Happy hacking

@zendive
Copy link
Owner

zendive commented Aug 1, 2023

referenced as a known issue in README.md and closing this issue

@zendive zendive closed this as completed Aug 1, 2023
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

No branches or pull requests

2 participants