My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Search
for
ProjectOverview  
This is a project description for XQuery debugger for MarkLogic XQuery applications.
Project-Overview, Featured
Updated Jan 10, 2011 by lisph...@gmail.com

XQDebug - MarkLogic XQuery Debugger

Project Overview:

The goal of the XQDebug Project is to provide a Browser based debugger that is independent of any editor or browser, that can be installed and available for developers and administrators to develop and debug applications.

XQDebug uses the MarkLogic debugging (dbg) API as much as possible to accomplish debugging tasks. Where the dbg library does not yet provide functionality, or we encounter bugs, we may need to create workarounds until a fix or update is available.

XQDebug must run from and write to a database that is independent of any application or XQuery code that it is debugging. Otherwise it is possible to introduce changes in the state of the application that is being debugged. Therefore the install must create a database named XQDebug and copy all code and write all persisted information to that database.

Prioritized Feature List:

The priority order of this feature list is only approximate because features are also grouped logically and some features in a group have a lower priority of being implemented.

The features which are listed in red have not been implemented yet.

  1. Windowing and window Layout (As functionality is added ...)
  2. Debug environment
    • Debugger role ("xqdebug-role")
      • Inherits "admin" role
    • Debugger user ("xqdebug")
      • with "xqdebug-role" role
    • Create "XQDebug" database"
      • collectionLexicon = "true"
      • wordLexicon = collation: http://marklogic.com/collation/codepoint
      • Create "/content/xqdebug/" directory
        • Clear permissions and privileges on directory
        • Set URI privilege with "xqdebug-role" role
        • Set riu pemissions for "xqdebug-role" role
    • In Debug database create "/code/xqdebug/" directory
      • URI Lexicon = true
      • Clear permissions and privileges on directory
      • Set URI privilege with "xqdebug-role" role
      • Set rx pemissions for "xqdebug-role" role
      • Load code from zip file
    • HTTP Server ("xqdebug-http")
      • Port = 9800
      • Database = "XQDebug"
      • Modules = "XQDebug"
      • Digest authentication
      • Nobody default user
      • Debugging disallowed
      • Profiling disallowed
  3. Connect to and Disconnect from application server
    • List of Application Servers in a table or window listing
      • The number of currently stopped and running requests
      • Application server settings for debug, profile & logging
      • Default modules and content databases
    • On connect create list of all .xqy URIs available for debugging on that server.
  4. Attach/Detach/Break into Request
    • List of Requests (table or window): stopped, debugging
    • List of Running requests with link or button to stop or break into the request for debugging
  5. Expression Display
    • Retrieve and Persist Expression IDs
      • Retrieve & display source line(s)
      • Page
      • Source File
        • Source for current expression
        • Select source file to display from application servers .xqy list.
  6. Execution
    • Display
      • Scroll source window so to current line.
    • Stop & Continue
      • jQuery for step/wait/eval
    • Step
      • Step
      • Step Out (Next Expression)
      • Next Statement
      • Finish (function)
      • Run/Continue
  7. Breakpoints
    • Set
    • Display
    • Clear
    • Persist Breakpoints between sessions
  8. Stack Trace Frames with:
    • Source Line
    • Variables
    • Global variables
    • External variables
  9. Standalone Deployment program
  10. Watch window expressions
  11. Invoke module for debugging
    • browser style URL for HTTP 'GET
    • setup 'POST' frame
    • jQuery select from application source files
  12. Eval() expression for debugging
    • CQ style textbox to edit and expression
    • Button to run an expression ... except on execution expression is stopped on first line for debugging
    • Results window
  13. Windows & tables
    • Resize, Expand & collapse
      • Persist size between sessions
    • Placement (rearrange) on screen
      • Persist location between sessions
  14. Source Editing:
    • jQuery source editor
    • Edit
    • Save
    • Source Syntax highlighting
    • Hover display of:
      • Variable value
      • Expression value
      • Function return value
    • Select and Right click (jQuery) to:
      • Variable type
      • Add to watch expressions
      • Run to cursor
    • ...
  15. CSS for display styles:
    • Breakpoints
    • Hover on expression (highlight containing expression)

Debug Information Persisted to User Session File in XQDebug Database (As needed):

  1. All debug information associated with User Name
  2. App Server(s) State (Connected/Disconnected)
    • On Connect:
      • Create list of all .xqy files in app-server modules DB below modules root
      • Save last expr-id of each line of each file
  3. Current request
  4. Watch expressions
  5. Breakpoints
  6. Associate Applications with their servers, databases and XQuery modules
  7. Eval Expression
  8. Invoke target/expression
  9. Source File Information
    • Media - DB or file-system
    • URI
    • Expression IDs by line #
    • Breakpoints
    • Functions - line, expr Id
  10. A link for each expression and it's text
  11. Window sizes and placement

Display of Configuration information

  1. Users
  2. Roles
  3. Amps
  4. Collections
  5. Execute Privileges
  6. URI Privileges
  7. Permissions: (Explorer like tree view of directories and files)
    • Side by side view with users and roles
    • Highlight users with or without necessary roles to view/access files and directories.

Sign in to add a comment
Powered by Google Project Hosting