MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / print

Method print

tools/xsbug-log/xsbug-debugmachine.js:392–404  ·  view source on GitHub ↗
(text, path, line, eventType = 'print')

Source from the content-addressed store, hash-verified

390 }
391
392 print(text, path, line, eventType = 'print') {
393 const payload = { text };
394 if (path !== undefined && path !== null) payload.path = path;
395 if (line !== undefined && line !== null) payload.line = parseInt(line);
396 this.report(eventType, payload, undefined, (data) => {
397 this.clearLine();
398 let out = data.text;
399 if (data.path) out = `${data.path} (${data.line}) ${out}`;
400 if (this.id !== undefined) out = `[Thread ${this.id}] ${out}`;
401 console.log(out);
402 this.showPrompt();
403 });
404 }
405
406 commandError(message) {
407 const cmd = this.currentCommand || 'error';

Callers 7

onTitleChangedMethod · 0.95
onLoggedMethod · 0.95
resolveFilePathMethod · 0.95
resolveDotPathMethod · 0.95
cmdInfoMethod · 0.95
cmdInfoBreakpointsMethod · 0.95
launchFunction · 0.45

Calls 4

reportMethod · 0.95
clearLineMethod · 0.95
showPromptMethod · 0.95
logMethod · 0.65

Tested by

no test coverage detected