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

How to debug / step through? #346

Open
rublev opened this issue Feb 2, 2025 · 5 comments
Open

How to debug / step through? #346

rublev opened this issue Feb 2, 2025 · 5 comments

Comments

@rublev
Copy link

rublev commented Feb 2, 2025

Image

I'm trying to load this extension and debug it to understand it and contribute PR's but I'm having trouble reasoning about the codebase and how to package the extension in a way that I can easily step through it.

@zhoushaw
Copy link
Member

zhoushaw commented Feb 2, 2025

Indeed, this piece of code isn't easy to grasp, as it involves whether the code is executed in the Chrome DevTools environment or the page environment. You can right-click on the midscene panel that appears, which will open the Chrome DevTools debugging pane where the source code can be debugged.

@rublev
Copy link
Author

rublev commented Feb 2, 2025

Indeed, this piece of code isn't easy to grasp, as it involves whether the code is executed in the Chrome DevTools environment or the page environment. You can right-click on the midscene panel that appears, which will open the Chrome DevTools debugging pane where the source code can be debugged.

That's what I posted a screenshot of above. Those files are all obfuscated. Is there a way to run the code inside the panel just as a react app in the browser? What's the development workflow? Thanks for your quick response. It's a little confusing with the 5 packages. I'm not sure what you mean by where it's executed within chrome devtools env or page env. Do you mean as an extension performing tasks on a page vs an entire chrome instance?

@zhoushaw
Copy link
Member

zhoushaw commented Feb 2, 2025

Currently, developing with Chrome DevTools cannot be launched like a standalone application. I will optimize this soon. In the meantime, you can try contributing to other areas. I will also refine this part of the code and the contribution guide in the near future.

@rublev
Copy link
Author

rublev commented Feb 3, 2025

Currently, developing with Chrome DevTools cannot be launched like a standalone application. I will optimize this soon. In the meantime, you can try contributing to other areas. I will also refine this part of the code and the contribution guide in the near future.

Awesome thanks. Can you go into detail what your current dev process is like? Do you build and manually load the extension every time or what?

@yuyutaotao
Copy link
Collaborator

@rublev yes, you need to build and manually reload the extension every time.

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

3 participants