Show caller stack trace
Summary: On Android, the stack trace looks different so we don't need to use the Regex we use on iOS. We can simply display all the lines in the trace. Reviewed By: pasqualeanatriello Differential Revision: D17181400 fbshipit-source-id: e471da17b89806a161edc7edcf05ac6faed44bf0
This commit is contained in:
committed by
Facebook Github Bot
parent
73e8c03eea
commit
4d324075e9
@@ -16,6 +16,7 @@ export type AddEventPayload = {|
|
||||
id: string,
|
||||
reason: string,
|
||||
stack_trace: Array<string>,
|
||||
skip_stack_trace_format?: boolean,
|
||||
surface_key: string,
|
||||
event_timestamp: number,
|
||||
update_mode: number,
|
||||
|
||||
@@ -22,10 +22,23 @@ function isSystemLibrary(libraryName: ?string): boolean {
|
||||
|
||||
type Props = {
|
||||
data: Array<string>,
|
||||
skip_stack_trace_format?: boolean,
|
||||
};
|
||||
|
||||
export default class extends React.Component<Props> {
|
||||
render() {
|
||||
if (this.props.skip_stack_trace_format) {
|
||||
return (
|
||||
<StackTrace backgroundColor={colors.white}>
|
||||
{this.props.data.map(stack_trace_line => {
|
||||
return {
|
||||
caller: stack_trace_line,
|
||||
};
|
||||
})}
|
||||
</StackTrace>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<StackTrace backgroundColor={colors.white}>
|
||||
{/* We need to filter out from the stack trace any reference to the plugin such that the information is more coincised and focused */}
|
||||
|
||||
@@ -284,7 +284,12 @@ export default class extends FlipperPlugin<State, *, PersistedState> {
|
||||
{this.renderTreeHierarchy(focusedTreeGeneration)}
|
||||
{focusedTreeGeneration && (
|
||||
<Sidebar position="bottom" minHeight={100} height={250}>
|
||||
<StackTrace data={focusedTreeGeneration.stack_trace} />
|
||||
<StackTrace
|
||||
data={focusedTreeGeneration.stack_trace}
|
||||
skip_stack_trace_format={
|
||||
focusedTreeGeneration.skip_stack_trace_format
|
||||
}
|
||||
/>
|
||||
</Sidebar>
|
||||
)}
|
||||
<DetailSidebar>
|
||||
|
||||
Reference in New Issue
Block a user