MCPcopy
hub / github.com/streamlit/streamlit / debug

Method debug

frontend/lib/src/render-tree/AppRoot.ts:564–578  ·  view source on GitHub ↗

* Returns a string representation of the AppRoot structure for debugging purposes. * This method traverses the AppRoot tree and outputs a formatted string * showing the hierarchy of its child nodes. * * @returns {string} A formatted string representing the AppRoot structure.

()

Source from the content-addressed store, hash-verified

562 * @returns {string} A formatted string representing the AppRoot structure.
563 */
564 public debug(): string {
565 let result = "AppRoot\n"
566 this.root.children.forEach((child, index) => {
567 const isLast = index === this.root.children.length - 1
568 const childName = this.getChildName(child)
569 const connector = isLast ? "└── " : "├── "
570 const childPrefix = isLast ? " " : "│ "
571
572 result += `${connector}${childName}:\n`
573 const visitor = new DebugVisitor(childPrefix, true)
574 result += child.accept(visitor)
575 })
576
577 return result
578 }
579}

Callers

nothing calls this directly

Calls 3

getChildNameMethod · 0.95
forEachMethod · 0.80
acceptMethod · 0.65

Tested by

no test coverage detected