question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add hooks so that the Developer Tools Console can be used to debug the running app

See original GitHub issue

Description

In working on the PR for #3720, I found myself missing something that is very helpful in testing out new code or ideas in Atom. In Atom, there is the atom global that is the gateway into the entire Atom public API, which can be accessed directly from the Developer Tools Console in any Atom window. This is very helpful for new community developers to learn how Atom works under the covers without having to write a full package to test their theories.

It might be useful for there to be a desktop global with hooks to various key state stores that could be probed for information or even the state altered in specific ways. This would be helpful for community developers to learn how Desktop works interactively.

Version

GitHub Desktop version: v1.1.1-beta1

OS version: Mac OS X 10.13.3

Steps to Reproduce

  1. Launch GitHub Desktop
  2. Press <kbd>Shift+Cmd+I</kbd> to open the developer tools
  3. Click the Console tab
  4. Type desktop.appStore.getRepositoryState()

Expected behavior: Get an object describing the repository’s state

Actual behavior: Uncaught ReferenceError: desktop is not defined

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Mar 2, 2018
0reactions
Nonameinfocommented, Feb 27, 2020

Description

In working on the PR for #3720, I found myself missing something that is very helpful in testing out new code or ideas in Atom. In Atom, there is the atom global that is the gateway into the entire Atom public API, which can be accessed directly from the Developer Tools Console in any Atom window. This is very helpful for new community developers to learn how Atom works under the covers without having to write a full package to test their theories.

It might be useful for there to be a desktop global with hooks to various key state stores that could be probed for information or even the state altered in specific ways. This would be helpful for community developers to learn how Desktop works interactively.

Version

GitHub Desktop version: v1.1.1-beta1

OS version: Mac OS X 10.13.3

Steps to Reproduce

  1. Launch GitHub Desktop
  2. Press Shift+Cmd+I to open the developer tools
  3. Click the Console tab
  4. Type desktop.appStore.getRepositoryState()

Expected behavior: Get an object describing the repository’s state

Actual behavior: Uncaught ReferenceError: desktop is not defined

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve custom Hook debugging with useDebugValue
In this tutorial, learn how to use the useDebugValue Hook to make debugging reports for your custom React Hooks easier and more descriptive....
Read more >
How To Debug React Components Using React Developer ...
Now that you are on a website that uses React, open the console to access the React Developer Tools. Open the console by...
Read more >
Debug your Reactjs Hooks with ease !! | by Anil Chaudhary
I created a simple hook which looks for old value and new values and log it appropriately to help. I have also packaged...
Read more >
Master Debugging from Zero to Hero with Chrome DevTools
If you're a beginner to the web development world or just don't know the right steps and tools to use to get yourself...
Read more >
Debugging React Apps with Chrome DevTools and Fiddler
A good example of this is in debugging. By using browser developer tools such as Chrome DevTools or Firefox Developer Tools, we can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found