Skip to content

Async arrow functions are not supported, making 'show source' unusable inside them #1208

@money-development

Description

@money-development

I'm using the 'show source' directive, however it only works with synchronous functions. With asynchronous ones, I still only see bytecode. Android/iOS the same.

"react": "18.2.0",
"react-native": "0.72.7",
"react-native-webview": "13.6.3"

export const syncFunc = () => {
  'show source';
  let a = 5;

  for (let index = 0; index <= 10; index++) {
    a += index;
  }

  console.log('syncFunc', a);
};

export const asyncFunc = async () => {
  'show source';
  let a = 5;

  for (let index = 0; index <= 10; index++) {
    a += index;
  }

  console.log('asyncFunc', a);
};
image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfixed-in-shFixed in SH but "wontfix" in Hermes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions