- Notifications
You must be signed in to change notification settings - Fork428
fix: support projects with namespace but org without replay debugger W-19604488#6579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
b76c34fef6dda619b3a6f98ff0abaded272a4aa80d9eaf796afc4e16946b1b60c00f2cd95b15acd91cb719d72ebcbec95413cb60d88d48b7610ee0ebaa5a5e0125adcc09b81582be4008d3b1dcaf15abb29dc08c8a4af367cb054b2b0cb3d4c22808e39914e98346fcd5ce6ac49d2b85c705f918688059ccf9fdcb4a1cbb625077447adabf104f2f9aba49718242fc65d5c1d00ed5b93File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,32 +9,11 @@ import { LineBreakpointInfo } from '@salesforce/salesforcedx-utils'; | ||
| import { DebugProtocol } from '@vscode/debugprotocol'; | ||
| export class BreakpointUtil { | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. a bunch of this was either completely unused or used only for testing. exposing the 2 maps simplifies things a lot | ||
| public lineNumberMapping: Map<string, number[]> = new Map(); | ||
| public typerefMapping: Map<string, string> = new Map(); | ||
| public canSetLineBreakpoint(uri: string, line: number): boolean { | ||
| return this.lineNumberMapping.get(uri)?.includes(line) ?? false; | ||
| } | ||
| public createMappingsFromLineBreakpointInfo(lineBpInfo: LineBreakpointInfo[]): void { | ||
| @@ -43,28 +22,18 @@ export class BreakpointUtil { | ||
| this.typerefMapping.clear(); | ||
| // set the mapping from the source line info | ||
| lineBpInfo.map(info => { | ||
| this.lineNumberMapping.set(info.uri, (this.lineNumberMapping.get(info.uri) ?? []).concat(info.lines)); | ||
| this.typerefMapping.set(info.typeref, info.uri); | ||
| }); | ||
| } | ||
| public getTopLevelTyperefForUri(uriInput: string): string | undefined { | ||
| return Array.from(this.typerefMapping.entries()).find(([k, v]) => v === uriInput && !k.includes('$'))?.[0]; | ||
| } | ||
| } | ||
| export const breakpointUtil = new BreakpointUtil(); | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. you can instantiate a class and export that instance instead of doing all the singleon pattern getInstance boilerplate | ||
| export const returnLinesForLoggingFromBreakpointArgs = (bpArr: DebugProtocol.SourceBreakpoint[]): string => | ||
| bpArr.map(bp => bp.line).join(','); | ||
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,39 +4,15 @@ | ||
| * Licensed under the BSD 3-Clause license. | ||
| * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
| */ | ||
| import {ApexExecutionOverlayResult } from '../types/apexExecutionOverlayResultCommand'; | ||
| export type ApexHeapDump = { | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. you don't need a class just to make some immutable props. | ||
| readonly className: string; | ||
| readonly namespace: string; | ||
| readonly line: number; | ||
| readonly heapDumpId: string; | ||
| overlaySuccessResult?: ApexExecutionOverlayResult; | ||
| }; | ||
| export const stringifyHeapDump = (heapDump: ApexHeapDump): string => | ||
| `HeapDumpId: ${heapDump.heapDumpId}, ClassName: ${heapDump.className}, Namespace: ${heapDump.namespace}, Line: ${heapDump.line}`; | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.