j4k0xb / webcrack

Deobfuscate obfuscator.io, unminify and unpack bundled javascript
https://webcrack.netlify.app
MIT License
663 stars 72 forks source link

add Chrome DevTools extension that allows the web IDE to be used within DevTools #29

Open 0xdevalias opened 7 months ago

0xdevalias commented 7 months ago

First off, I LOVE the new v2.11.0 update, and the changes to the web IDE to use monaco to support 'references', 'go to declaration', etc.

This issue is about an idea I've had and wanted to work on myself for a while, but haven't got around to it yet. Often when exploring web apps, I make pretty heavy use of Chrome DevTools' 'Search' / 'Sources' / 'Network' / etc tabs, the debugger, and the console / utilities APIs. While there have been some nice improvements to the 'Sources' tab over the years (pretty printing, syntax highlighting, code folding, etc); one area I have really wished it was able to support for a long time now is 'references' / 'go to definition' / similar.

A thought I had in this space is that, while I obviously can't outright replace the 'Sources' tab (which I believe is based on CodeMirror), it should be possible to create a Chrome DevTools Extension that adds a new tab/panel that does similar to the current 'Sources' tab, but using monaco as it's base, and enabling features like 'references' / 'go to definition' / etc within that.

Useful Chrome Extension APIs

Overview of extending DevTools:

Some of the Chrome Extension API's that would be useful/enable this:

Then there are also all of the 'standard' Chrome Extension APIs as well, which can do a lot of cool stuff:

A few of which could be useful for this feature:

And some that are a little more esoteric, but might still be interesting/useful:


Edit: This is also captured on the following gist for posterity, and that will likely be where I capture any future notes about my own explorations of this: