alexweininger/recent-pdf

Add search functionality

alexweininger opened this issue · 15 comments

Add search functionality

Hey @alexweininger 👋🏻
I'd like to work on this but I'm running into this issue (step 4 of Getting Started)
image
It appears to be looking for a manifest file that doesn't exist. This is the first chrome extension I've worked on so forgive me if I'm overlooking something.

Make sure to select the dist/ directory. This directory holds the output of the src/ and the things Chrome needs to bundle the extension. (this is where the manifest.json file is located as well).

Hope this helps!

@alexweininger Ah, you have to make sure to run yarn/npm watch first. Might want to add that to the readme even if it's implied. You mind assigning me this search functionality task?

Assigned the task to you, let me know if you have any other questions. Thanks!

@alexweininger Hey man, can you point me in the right direction for enabling my chrome debugger to actually detect console statements or debuggers I place in the code for this extension. It seems like I can't get anything to trigger or log. So I'm stuck here!
image

Ya I remember this being a little tricky. Let me see what I can find out for you. What happens if you Right click -> inspect element within the chrome extension popup? I believe this is where the console output should be. (Rather than the debugger attached to the browser window itself)

Ah I see! It's actually "inspect pop up" but thanks for the direction:
image

Awesome!

@alexweininger Glad I can be the source of all your hacktoberfest treats 😉🎃

@alexweininger maybe we can find a way to screen share or something in the next couple of days for you to walk me through this debugging process because it seems pretty hit or miss for me right now and it's hard for me to figure out what's going on. Especially being so used to a react environment 😛 I like the vanilla js aspect though.

Is it typescript that's giving you trouble?

I've dealt with similar issues before.

I found answers in this post to be helpful.

One of the answers shows how to do this:

  1. find the ID: for the recent pdf extension in chrome://chrome/extensions/

  2. You can then load your popup in a regular window by
    chrome-extension://id_of_your_application/index.html

Also you can reload the debugger and it will reload the popup, and then hit the breakpoints without closing the debugger. Just press Ctrl + R while focusing on the debugger window.

The reason why the breakpoints are not hitting is that the popup loads and runs the scrips before you open the popup. Kinda annoying but you just need to have the debugger attached before you reload the popup.

Closed in #109