Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 879
  • Last Modified:

How can I debug a bookmarklet in Chrome?

Since the bookmarklet is not part of the document, I don't know how to use Chrome dev tools to debug the bookmarklet's javascript code.

How can I debug a bookmarklet in Chrome?
0
SAbboushi
Asked:
SAbboushi
  • 2
  • 2
1 Solution
 
Michel PlungjanIT ExpertCommented:
Just put it in the head of a page and give it a button
If it is your search BM then it will behave the same in a demo page as if it was a bookmarklet
0
 
SAbboushiAuthor Commented:
Thanks - that helps!

I am wondering if there is a way to debug the actual bookmarklet (maybe using remote debug which I haven't looked into yet: I believe remote debug allows us to debug chrome, so I would think that the bookmarklets would be accessible to a remote debug session?)
0
 
Michel PlungjanIT ExpertCommented:
I doubt it except the bookmarklet runs in the scope of the page it had been executed in so debug that page
0
 
SAbboushiAuthor Commented:
k thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now