Skip to content

Commit

Permalink
debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Dec 31, 2024
1 parent 0b74b1a commit 55a43bd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13408,7 +13408,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
//
//----------------------------------------------------------------------------/
// This is used to log changes made to the client UI database. It is the same
// a call to "sqlui( ... )" except that thhe first paramter is a randomly
// as a call to "sqlui( ... )" except that the first parameter is a randomly
// typed keyboard debug ID like "hjkgdsfhjfdgsjhgfdsjfdgsjkfgdsjfgjksfgjsfgjdk"
//
//________
Expand All @@ -13424,17 +13424,25 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
// params
// ------ The SQL params
//-----------------------------------------------------------/

//
// do the SQL with a normal alasql call
//
let ret = alasql(sql , params)

//
// if we are not debug mode then log the SQL
//
//if ((typeof $DEBUGUI !== 'undefined') && ($DEBUGUI == "true") && yz.uiDb.tablesCreated) {
if ((typeof $DEBUGUI !== 'undefined') && ($DEBUGUI == "true")) {
debugger
let startOfSql = sql.toLowerCase()

//
// don't deal with "insert" rows here as the autogenerated IDs will not be copied over since AlaSQL and sqlite
// may handle them differently. Inserts are dealt with in a special debug trigger
//
if ((dbgCode != null) && (yz.uiDb.tablesCreated)) {
debugger
if (startOfSql.startsWith("insert") || startOfSql.startsWith("update") || startOfSql.startsWith("delete")) {
let sourceForCallerOfFunction = yz.uiDb.findSourceLineInCode(dbgCode)
let sourceFileName = null
Expand Down Expand Up @@ -13537,7 +13545,6 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
//
// find the source code where this was called from
//
debugger
let sourceForCallerOfFunction = yz.uiDb.findSourceLineInCode(callerDebugToken)


Expand Down

0 comments on commit 55a43bd

Please sign in to comment.