Skip to content

Commit

Permalink
Removed "getFnNameFromLine( )" as some code called from anonymous fns
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Jan 10, 2025
1 parent ea27ec3 commit 7647d6f
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13722,10 +13722,11 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
// "ui_table_debug_code_sections" will be from the start of the function to
// the marker "endOfDebugSection( )"
//

// the startDebug( ) call is made from a JS function
if (lengthOfRestOfLine < 5) {
startLineIndex = sourceForFunction.lineNumber - 1
let previousLine = yz.debug.linesOfSourceFile[sourceForFunction.fileName][startLineIndex - 1]
let fnName = yz.debug.internal.getFnNameFromLine( previousLine )
let allText = ""
let readAnotherLine = true
let nextLine
Expand All @@ -13750,7 +13751,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
yz.uiDb.uiDbNextId ++,
debugId,
null,
fnName,
null,
sourceForFunction.fileName,
startLineIndex,
endLineIndex,
Expand Down Expand Up @@ -13968,18 +13969,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
let indexEndFn = fnStartString.indexOf(" ")
let fnNameString = fnStartString.substring(0,indexEndFn)
return fnNameString
},
getFnNameFromLine: function ( fnLine ) {
//'at Proxy.installAppNow (eval at addRuntimePipelinesAndRunCode (http://192.168.1.171/app/appstore.html:1070:36), <anonymous>:158:29)'
let indexColon = fnLine.indexOf(":")
if (indexColon == -1) {
return null
}

let fnUptoColon = fnLine.substring(0,indexColon)
let trimmed = fnUptoColon.trim()
return trimmed
},
}
},

linesOfSourceFile: {}, // the lines of code in go.html and other source files = [line 1, line 2, etc...]
Expand Down

0 comments on commit 7647d6f

Please sign in to comment.