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

Method cmdInfo

tools/xsbug-log/xsbug-debugmachine.js:2476–2524  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

2474 }
2475
2476 cmdInfo(args) {
2477 this.currentCommand = 'info';
2478 let subcmd = args[0] || 'breakpoints';
2479
2480 // Handle dotted module paths: "info module.Resource.default"
2481 if (subcmd.startsWith('module.')) {
2482 const dotIndex = subcmd.indexOf('.');
2483 const dotPath = subcmd.substring(dotIndex + 1).split('.');
2484 this.cmdInfoModules(dotPath, false);
2485 return;
2486 }
2487
2488 switch (subcmd) {
2489 case 'breakpoints':
2490 case 'break':
2491 case 'b':
2492 this.cmdInfoBreakpoints();
2493 break;
2494 case 'instruments':
2495 case 'instrument':
2496 this.cmdInfoInstruments();
2497 break;
2498 case 'locals':
2499 case 'local':
2500 this.cmdPrint([]);
2501 break;
2502 case 'globals':
2503 case 'global':
2504 this.cmdInfoGlobals();
2505 break;
2506 case 'modules':
2507 this.cmdInfoModules(args.slice(1), true);
2508 break;
2509 case 'module':
2510 this.cmdInfoModules(args.slice(1), false);
2511 break;
2512 case 'exceptions':
2513 this.print(`Break on exceptions: ${this.exceptionsMode}`);
2514 this.showPrompt();
2515 break;
2516 case 'start':
2517 this.print(`Break on start: ${this.breakOnStart ? 'on' : 'off'}`);
2518 this.showPrompt();
2519 break;
2520 default:
2521 this.commandError('Syntax: info breakpoints | locals | globals | modules[.name.path] | exceptions');
2522 break;
2523 }
2524 }
2525
2526 cmdInfoBreakpoints() {
2527 const bpData = this.breakpoints.map(bp => ({

Callers 1

handleCommandMethod · 0.95

Calls 9

cmdInfoModulesMethod · 0.95
cmdInfoBreakpointsMethod · 0.95
cmdInfoInstrumentsMethod · 0.95
cmdPrintMethod · 0.95
cmdInfoGlobalsMethod · 0.95
printMethod · 0.95
showPromptMethod · 0.95
commandErrorMethod · 0.95
sliceMethod · 0.65

Tested by

no test coverage detected