Skip to content

Commit

Permalink
Always create a new record when "startDebug( )" is called
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Dec 27, 2024
1 parent 954355b commit 191e255
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13599,20 +13599,28 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
return
}

//
// reset all the debug markers as we are starting a new debug trace
//
yz.debug.currentDebugId = debugId
yz.debug.debugTracerId = yz.uuidv4()
yz.debug.debugTraceSteps = []
yz.debug.debugTick = 1


//
// Find out which source code line we are editing
//
debugger
let sourceForFunction = yz.uiDb.findSourceLineInCode(debugId)

//
// store the debug code
//
let startLineNumber = sourceForFunction.lineNumber - 1
let codeSectionRecord1 = yz.uiDb.sqlui1("select * from ui_table_debug_code_sections where fk_debug_id = ?",
[debugId])
if (!codeSectionRecord1) {
//let codeSectionRecord1 = yz.uiDb.sqlui1("select * from ui_table_debug_code_sections where fk_debug_id = ?",
// [debugId])
//if (!codeSectionRecord1) {
let indexOfDebugId = sourceForFunction.lineText.indexOf(debugId)
let upToDebugId = sourceForFunction.lineText.substring(indexOfDebugId)
let indexToEndOfDebugId = upToDebugId.indexOf("\")")
Expand Down Expand Up @@ -13669,7 +13677,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
])
}

}
//}

//
// insert the trace record
Expand Down

0 comments on commit 191e255

Please sign in to comment.