Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'master' into 'jsdbg_gdb_support' (#46)
* Merged PR 39: WTFHelpers: Add whitespace formatting functionality for WTF Strings Add whitespace formatting functionality for WTF Strings. This was inadvertently removed from one of the last commits of the DOMTree extension. * Merged PR 42: BlinkHelpers: Move whitespace formatting to CharacterData data type description Moving whitespace formatting behavior out of the lowest level WTFStringImpl Text type description and into the CharacterData data type description. Because the whitespace formatting functionality wraps the text in a span, adding this call at the lowest level creates problems for higher-level type descriptions that do not expect the span to be present. * Merged PR 41: Fix dbgobject documentation link Fix dbgobject documentation link * Merged PR 40: Add helpful fields for debugging selection Extended fields being added: - Range startContainer - Range endContainer - Document DOMSelection - ShadowRoot DOMSelection - DOMSelection FrameSelection - Document body Type descriptions being added: - Range startOffset - Range endOffset * Merged PR 38: Add error messages for Chromium extensions This change adds error messages for debugger errors to AXTree and DOMTree. To share the message structure and strings detailing common problems, a "error-messages" extension is being created. This extension is not only consumed by Chromium's AXTree and DOMTree extensions, but also by Edgehtml's BoxTree extension. As an additional refactoring change, the blink extension is being moved under the chromium extension, so that all chromium-related extensions are under one umbrella. * JsDbg.VisualStudio: Fix VS2017 references, remove support for 2015 Also cleans up various build flavors. * JsDbg.sln: Upgrade all projects to VS2017 * JsDbg.Core: Normalize line endings * Merged PR 45: Introduce the concept of synthetic modules In non-component builds of Chromium, the same type is occasionally declared in multiple modules. To handle this, the concept of a synthetic module name is being introduced. A synthetic module name is a "fake" name that represents one or more real module names. If a type is created using a synthetic module name, when that type is queried, every real module with that synthetic name will be tried until the type is successfully found. Symmetrically, when a real module name is returned from the server, it will be converted to its synthetic name (if it has one) before being consumed by higher-level extensions. This allows extended fields/array fields/type descriptions to be written once and work across multiple modules. To prevent excessive wrong module lookups, the collection of real module names for every synthetic name will be sorted such that the last successfully looked-up module will be the first one accessed during the next lookup. This heuristic works because it is highly likely that next lookup will be for a type in the same module. * JsDbg.VisualStudio: Bump version number * Merged PR 44: BlinkHelpers: Add helpers for accessing commonly used HTMLCollections and NodeLists Extended fields being added: - Node childNodes - ContainerNode children - Document all - Document images - Document applets - Document embeds - Document links - Document forms - Document anchors - HTMLDataListElement options - HTMLFormElement elements - HTMLMapElement areas - HTMLSelectElement options - HTMLSelectElement selectedOptions - HTMLTableElement rows - HTMLTableElement tBodies - HTMLTableRowElement cells - HTMLTableSectionElement rows - Node rare_data_ - NodeRareData element_rare_data_ - ContainerNode child_nodes_ (renamed from "Child Nodes") Type descriptions being added: - WTF::KeyValuePair Pair Array fields being added: - WTF::HashTable Pairs * JsDbg.VisualStudio: Bump version number * JsDbg.VisualStudio: Bump version number * Fix globalConstantNames function on DbgObject. * VarInspector: Fix void ptr to Var conversion, and subobject parent lookup. * VarInspector: Fix typo causing bad naming style. * JsDbg.VisualStudio: Bump version number * Merged PR 46: Restore the "debugger is not broken in" indicator While adding support for target-specific extensions, the "debugger is not broken in" indicator was broken. This happened because the serving of extensions now needs to talk to the debugger to check if a given module is loaded or not. However, if the debugger is busy, JsDbg will wait infinitely for the debugger to break in before continuing to serve extensions. To fix this, a new API called "IsDebuggerBusy" is being added to server. This API will query WinDbg or the VS debugger to check if it is broken in or not, and is now called while serving extensions. If the debugger isn't broken in, the module loaded check will be skipped and the target-specific extension will be served unconditionally. (This is okay because the user will not be able to use the extension while the debugger is running anyways.) * JsDbg.VisualStudio: Bump version number * Merged PR 43: BlinkHelpers/WTFHelpers: Tag added fields as user editable Annotate added fields in BlinkHelpers and WTFHelpers with UserEditableFunctions.Create so that users can see/edit the implementations. * JsDbg.VisualStudio: Bump version number * WTFHelpers: Add array field to visualize the elements of a WTF vector. * BlinkHelpers: Add extended fields to cast from ElementData to UniqueElementData or ShareableElementData. * DOMTree: Improve GetRoots perf by only performing one global lookup for content!g_frame_map. * BlinkHelpers: Add array field for viewing the collection of attributes for any given element. * BlinkHelpers: Add extended fields to retrieve the layout object that corresponds to a node. * BlinkHelpers: Refactor the layout object extended field on node. * BlinkHelpers: Add type description to view the type of an input element. * Merged PR 48: Enable Chromium extensions to work with content_shell Enable Chromium extensions to work with content_shell * Merged PR 49: Adding example videos and an extension template to help developers contribute to JsDbg Adding a template for tree-inspector based extensions. Also adding an extension that includes example videos for creating a new JsDbg extension and adding fields. * JsDbg.VisualStudio: Bump version number * Merged PR 47: Add cclayertree extension Provide visualization of tree structure along with an extended field for bounds. Also create a gfx-type-helpers extension for visualizing types from the gfx:: namespace (currently limited to Point and Size) * Examples: Add jsdbg toolbar and extension catalog. * DOMTree: Simplify GetRoots by using Object extended field for base::LazyInstance. * Merged PR 50: Support cross-module interactions with the Chromium content module Cross-module interactions with Chromium component builds are handled by using a synthetic module name per target process to encompass multiple (actual) module names. For modules, like content, that can be seen when debugging different processes, modular equivalency needs to be established based on the process that is actively being debugged. This change adds support for this in JsDbg, with one missing piece. Currently, there is no way to detect the target process in the JsDbg client or server. This support should come in a subsequent change. Until then, this is being worked around by each Chromium extension explicitly declaring the name of the process that it targets. * JsDbg.VisualStudio: Bump version number * ChromiumHelpers: Treat all cc related modules as equivalent. * JsDbg.VisualStudio: Bump version number * Merged PR 51: Enable Chromium extensions to work with browser_tests Enable Chromium extensions to work with browser_tests * JsDbg.VisualStudio: Bump version number * DOMTree: Add name renderer to show the URL alongside a document node. * Merged PR 52: Update JsDbg in response to process changes in the debugger When the debugger is attached to multiple processes, JsDbg only shows data associated with the process that was active when JsDbg was launched. If the process is subsequently switched in the debugger, JsDbg does not respond to the update and shows stale information. With this change, JsDbg will respond to process changes in the same way it responds to other debugger changes (ex. stepping). This feature is supported with both WinDbg and the VS debugger. * JsDbg.VisualStudio: Bump version number * DebuggerRunner: Fix bug preventing Windbg from attaching to crash dumps. * DebuggerRunner: Fix bug preventing the VS debugger from attaching to crash dumps. * JsDbg.VisualStudio: Bump version number * MSHTMLHelpers: Fix CModernArray Items array field. * JsDbg.WinDbg: Only access debugger system objects when the debugger is broken in. * MarkupTree: show generated tag for non markup tree nodes. * Merged PR 53: Introduce the TEB extension Adding an extension for the ntdll target to visualize the thread environment block (TEB) of the current thread. The full list of changes is: - Add an extension to see the TEB for the current thread. - Add type descriptions to retrieve the process ID and thread ID from the TEB. - Add an array field to view the contents of all TLS slots for this TEB. - Add a custom name renderer to show the thread ID next to the TEB type. - Detect thread changes in WinDbg and the VS debugger, and update the JsDbg client when the thread changes. (When this happens, the TEB extension should find a different root - the TEB for the switched-in thread.) - Fix a bug related to the dereferencing of pointer types in arrays. * Merged PR 54: Enable process and thread switching from JsDbg This change introduces a feature that allows the active thread or process in the debugger to be changed from the JsDbg client. In the client, two select dropdowns are being added to the JsDbg toolbar: one for the attached processes and one for the threads of the active process. To power these dropdowns, a few APIs are being added to the transport extension. - GetAttachedProcesses: Gets all the processes the debugger is attached to. Used to populate the processes dropdown. - GetTargetProcess: Gets the process that is currently being debugged. This process will be selected in the dropdown. - SetTargetProcess: Sets the active process in the debugger when the user selects a different process in the dropdown. - GetCurrentProcessThreads: Gets all the threads for the target process. Used the populate the threads dropdown. - GetTargetThread: Gets the thread that is currently being debugged. This thread will be selected in the dropdown. - SetTargetThread: Sets the active thread in the debugger when the user selects a different thread in the dropdown. In the server, functionality is being added to power the above-mentioned APIs. For WinDbg, the target process and the list of attached processes can be queried from the system objects data member. To set the target process, we simply issue the process switch command to the debugger via the debug control object. For the Visual Studio debugger, the target process can be retrieved from the process COM object that passed in with the Event function. The attached processes list is created and maintained by listening for the process create and process destroy events. To set the active process, we use to "Debug.SetCurrentProcess" command. The server gets/sets thread information in a similar manner to process information, except that the list of threads is retrieved from the current process rather than querying the debugger. * Merged PR 55: Chromium: Handle msedge and msedge_child target modules Handle msedge and msedge_child target modules * JsDbg.VisualStudio: Bump version number * Merged PR 56: Move persistent store and user feedback from iefs to Azure Blob Storage This is a first in a series of changes to decouple JsDbg from iefs. This decouple is prerequisite for expanding JsDbg's reach to users outside Microsoft. A storage account is being created for JsDbg, and the persistent store and user feedback directories have been moved into their own (separate) Azure blob containers. All existing user data has been copied from iefs into these container, so that previous data is not lost. As an aside, the .NET version for this project is being upgraded from 4.5.2 to 4.7.2. This upgrade allows us to use the latest Azure storage APIs, rather than older versions. * JsDbgPackage: Remove unused member. * JsDbg.VisualStudio: Bump version number * Merged PR 57: CCLayerTree: Fix GetRoots to address recent decoupling of RenderWidget and RenderViewImpl CCLayerTree was broken by this commit: https://microsoft.visualstudio.com/EdgeOSS/_git/Chromium.src/commit/7bbf22d9c6685ee470695f76e78a78ded8335501, which removes RenderWidget from RenderViewImpl's inheritance chain and instead add a RenderWidget pointer to RenderViewImpl. * JsDbg.VisualStudio: Bump version number * Remove unused color-hash extension. * AXTree: Fix name renderer for AXTree. * Merged PR 58: ExtensionDLL: Update WinDbg extension to retrieve JsDbg extension from Azure Currently, the JsDbg WinDbg extension simply points to a script on iefs that retrieves the necessary files (also stored on iefs) and runs them. To decouple from iefs, the scripts and launch files are being moved into Azure, and the WinDbg extension is being modified to download these locally, using wininet. To make this work, the JsDbg scripts also need to be updated to use the local files. This has been done for the unstable script. The same will be done for the stable script once the unstable version has been validated. * Merged PR 59: JsDbg.WinDbg: Wait for debugger to break in if querying system objects throws an exception This change fixes a bug that caused JsDbg to shutdown (disconnect from debugger) when stepping through WinDbg. This bugs occurs when the users steps quickly in WinDbg, causing certain debug system object queries from WinDbg to fail because the debugger is busy. The fix here is retry the system object query once the debugger is no longer busy. To implement this fix, some additional plumming was needed through the rest of the JsDbg server code. * JsDbg.WinDbg: Perform multiple retries when waiting for the debugger to be broken in. * JsDbg.VisualStudio: Fix build break. * Merged PR 60: Remove user feedback feature With this change, we are removing the user feedback feature. As we move JsDbg to be open-source, there are governances that need to be followed when it comes to data collection. To avoid that overhead, we are removing features that send data about user activity. A future change will restructure the persistant storage feature to avoid sending data upstream. * Merged PR 61: Use temp directory for persistent storage The persistent storage for JsDbg will now read/write from/to the temp directory, instead of an Azure-based record. Since the storage is local to the user's machine, we can avoid the overhead that comes with user data collection * JsDbg.VisualStudio: Bump version number * Fix release configuration.json file. * Merged PR 62: JsDbg.VisualStudio: Update the JsDbg extension for Visual Studio from Azure. JsDbg.VisualStudio: Update the JsDbg extension for Visual Studio from Azure * Update README.md * README: Add link from Using JsDbg section to Setup JsDbg section. * Update CONTRIBUTING.md * CONTRIBUTING.md: Fix async section header and add a section for debugging JsDbg extensions. * Merged PR 63: Introduce the LayoutObjectTree extension Introducing an extension to visualize the layout object tree for Chromium. The specific changes are: - Introduce LayoutObjectTree that can be used to inspect any LayoutObject and its children. - Define LayoutObjectTree's GetRoots to get all the documents for the current renderer process and retrieve the LayoutObject associated with each of them. - Share the code to retrieve documents between the DOMTree and LayoutObjectTree extensions, by adding a GetDocuments helper to the blink-helpers extension. - Define LayoutObjectTree's addChildren to get children from the "children_" LayoutObjectChildList associated with the layout object (if it has one). - Add an array field to inspect the entries within a LayoutObjectChildList. - Add an array field to inspect the entries within a InlineBoxList. - Add an action to launch the LayoutObjectTree extension from the type explorer in another extension. * JsDbg.VisualStudio: Bump version number * BlinkHelpers: Add default type description for blink::Color * JsDbg.VisualStudio: Bump version number * BlinkHelpers: Add default type descriptions for LayoutUnit, LayoutSize and LayoutPoint. * CCLayerTree: Add type description for layer id and add default description for ElementId. * GfxHelpers: Add default descriptions for PointF, Point3F, Vector2dF and ScrollOffset. * Merged PR 64: CCLayerTree: Add extended fields to inspect the copied parts of the layer tree for the impl thread - Adds an extended field to retrieve the LayerTreeHostImpl (layer tree host equivalent for the impl thread) from a LayerTreeHost. - Adds an extended field to retrieve the sync tree (either the active or pending LayerTreeImpl) from a LayerTreeHostImpl. - Adds an extended field to retrieve the LayerImpl (layer equivalent for the impl thread) from a Layer. * Remove unused image files. * Add images to be used as part of README. * Cleanup of CONTRIBUTING.md * Update README to include examples of JsDbg extension usage and to clarify stance on supported debuggers and platforms. * README: Add clarifying statement to README that the target audience is browser/web platform developers. * Pull from JsDbg public repo in preparation for open source. * Add Microsoft copyright and MIT license header to js files. * Remove TODO file and deployment script from repo root. * Add Microsoft copyright and MIT license header to css files. * Add Microsoft copyright and MIT license header to html files. * Add Microsoft copyright and MIT license header to cpp files. * Add Microsoft copyright and MIT license header to csharp files. * User customization via "edit" and "extend" buttons (aka persistent store) is broken * README: Fix typo in description of domtree_3.png * Add features.md to describe some of the commonly used JsDbg features. * Fix broken images in FEATURES.md * FEATURES.md: grammatical corrections * JsDbg.VisualStudio: Bump version number * BlinkHelpers: Fix the node_layout_data_ field on blink::Node to fetch layout data from rare data when the node has an associated rare data object. * BlinkHelpers: Remove layout_object_ extended field on blink::Node. * FEATURES.md: Update action images to reflect the removal of the layout_object_ extended field from blink::Node. * FEATURES.md: Update extended field image and example to reflect removal of the layout_object_ extended field on blink::Node. * JsDbg.VisualStudio: Bump version number * Add a type description for blink::Length (#4) * Add a type description for blink::Length * Fix typo & make type description primary * JsDbg.VisualStudio: Bump version number * Print LayoutUnits as pixels (e.g. "10.5px") (#5) * Make JsDbg.VisualStudio build with a default installation of VS2017 (#7) It needs a prerequisite entry for VS extension development. Also, it seems that the CommandBars reference was incorrectly (?) added, this now looks the same as the Microsoft.VisualStudio.Debugger.Interop entry. * JsDbg.VisualStudio: Bump version number * Add support for differentiating global symbols that have the same name but different types (#9) * Fixing AXTree code to refer to new AXTreeManager instance * Adding Promise.any and adding missing Extended Field * [blink] Add type overrides for ComputedStyleBase (#13) Basically adds an override for all the bitfields in https://cs.chromium.org/chromium/src/out/Debug/gen/third_party/blink/renderer/core/style/computed_style_base.h?type=cs&sq=package:chromium&g=0 Plus StyleSelfAlignmentData and StyleContentAlignmentData. * BlinkHelpers: Fix the type extended field on HTMLInputElement to correctly handle the case where the type is not explicitly specified by an attribute. * Addressing CR feedback * Addressing Promise.any feedback * Add various LayoutNG types to blink-helpers (#8) * Add an extension to view the NG fragment tree (#10) * Inspector for a compositor frame * rgba has alpha as float in CSS * CR feedback * Fix char allocator * Only use true/false descriptions for single bit scalar values. (#25) * CR feedback * Use the htmlName in error messages (#23) Otherwise, templates won't display correctly * CR feedback around promises * [blink] Add an extended field for DataRef (#37) To more easily go to the pointed object instead of requiring two steps. Modeled after the std::unique_ptr extended field. * JsDbg.Windows: Rename types to highlight their DIA dependencies Manual cherry-pick of commit bd3d966 from the jsdbg_gdb_support branch. * JsDbg.Remoting: Rename to JsDbg.Windows.Remoting This effectively manually cherry-picks commit a0bfeb6 from the jsdbg_gdb_support branch for easier merging. * Add a JsDbg.Windows project and move Dia files there This is basically a manual cherry-pick of commit 7799d05 from the jsdbg_gdb_support branch. * Write all logging to Console.Error This cherry-picks the logging-related parts of commits 7799d05 and 160a705 from the jsdbg_gdb_support branch. Writing to Error helps with gdb because Out is used for communication between the server and gdb. * ChromiumHelpers: msedge_child and chrome_child should be tagged as modules used in multiple Chromium processes. * [gdb] Add stubs for new IDebugger methods
- Loading branch information