MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / normalizeDebugStackFrames

Function normalizeDebugStackFrames

src/snapshot-tests/json-normalize.ts:206–228  ·  view source on GitHub ↗
(items: unknown[])

Source from the content-addressed store, hash-verified

204}
205
206function normalizeDebugStackFrames(items: unknown[]): unknown[] {
207 if (!items.every(isDebugStackFrameRecord)) {
208 return items;
209 }
210
211 const firstAppFrameIndex = items.findIndex((frame) =>
212 frame.displayLocation.includes('<SIM_APP_BUNDLE>/'),
213 );
214 if (firstAppFrameIndex === -1) {
215 return items;
216 }
217
218 const stableLaunchBoundaryIndex = items.findIndex(
219 (frame, index) =>
220 index < firstAppFrameIndex &&
221 frame.displayLocation.includes('GraphicsServices.framework/GraphicsServices'),
222 );
223 if (stableLaunchBoundaryIndex <= 0) {
224 return items;
225 }
226
227 return items.slice(stableLaunchBoundaryIndex).map((frame, index) => ({ ...frame, index }));
228}
229
230function normalizeBuildSettingsEntryKey(key: string): string {
231 if (key.startsWith('SDK_DIR_')) {

Callers 1

normalizeValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected