Skip to content

Commit

Permalink
trying to insert SQL statements called at the line they are actually …
Browse files Browse the repository at this point in the history
…called
  • Loading branch information
yazz committed Nov 20, 2024
1 parent 5392bcc commit 7890bea
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -9652,10 +9652,10 @@

<div v-if="selectedLogItemContextStartLineNumber">
<pre style="height: auto;"><span style="color: blue;" v-if="selectedTraceLogItemArguments">ARGS: {{selectedTraceLogItemArguments.slice(1)}}</span>
<template v-for="(contextLine,indexContextLine) in yz.uiDb.linesOfSourceFile[ selectedLogItemFileName].slice(selectedLogItemContextStartLineNumber,selectedLogItemContextEndLineNumber)"><span v-bind:style='selectedLogItemContextLineNumber==(selectedLogItemContextStartLineNumber + indexContextLine + 1)?"color:red":""'>{{selectedLogItemContextStartLineNumber + indexContextLine + 1}}: {{contextLine}}</span><span v-if="traceLogItemCalls[selectedLogItemContextStartLineNumber + indexContextLine + 1]" style="color: red;"><div v-for="logItemId in traceLogItemCalls[selectedLogItemContextStartLineNumber + indexContextLine + 1]"><debug_frame_component v-bind:log_id="logItemId" v-bind:key="logItemId"></debug_frame_component></div></span>
<template v-for="(contextLine,indexContextLine) in yz.uiDb.linesOfSourceFile[ selectedLogItemFileName].slice(selectedLogItemContextStartLineNumber,selectedLogItemContextEndLineNumber)"><span v-bind:style='selectedLogItemContextLineNumber==(selectedLogItemContextStartLineNumber + indexContextLine + 1)?"color:red":""'>{{selectedLogItemContextStartLineNumber + indexContextLine + 1}}: {{contextLine}}</span><span v-if="traceLogItemCalls[selectedLogItemContextStartLineNumber + indexContextLine + 1]" style="color: red;"><div v-for="logItemId in traceLogItemCalls[selectedLogItemContextStartLineNumber + indexContextLine + 1]"><debug_frame_component v-bind:log_id="logItemId" v-bind:key="logItemId"></debug_frame_component></div></span><div v-if="sqlUiDbUpdates[log_id] && (sqlUiDbUpdates[log_id].lineNumbers[selectedLogItemContextStartLineNumber])" style="color: white;background-color: black;">{{sqlUiDbUpdates[log_id]}}</div>
</template>
</pre>
<div v-if="sqlUiDbUpdates[log_id]" style="color: white;background-color: black;">{{sqlUiDbUpdates[log_id].traceLogRecords}}</div>
<div v-if="sqlUiDbUpdates[log_id]" style="color: white;background-color: black;">{{sqlUiDbUpdates[log_id]}}</div>
</div>


Expand Down Expand Up @@ -9728,7 +9728,16 @@
if (sqlLogRecords.length > 0) {
debugger
mm.sqlUiDbUpdates[mm.log_id] = {
traceLogRecords: sqlLogRecords
traceLogRecords: sqlLogRecords,
lineNumbers: {}
}
for (let logRecord of sqlLogRecords) {
let callerLine = logRecord.caller_line_number
if (!mm.sqlUiDbUpdates[mm.log_id].lineNumbers[callerLine]) {
mm.sqlUiDbUpdates[mm.log_id].lineNumbers[callerLine] = []
}
mm.sqlUiDbUpdates[mm.log_id].lineNumbers[callerLine].push(logRecord)

}
}

Expand Down

0 comments on commit 7890bea

Please sign in to comment.